Patent ID: 8806460

Claim:
A method for allocating storage locations to variables while compiling code for a computing system, comprising: identifying a first variable associated with a code segment within code being compiled; assigning a first priority tag to the first variable; identifying a second variable associated with another code segment within the code being compiled; assigning a second priority tag to the second variable; using the assigned priority tags in assigning storage locations to the first and second variables; wherein using the assigned priority tags in assigning storage locations to the first and second variables comprises: determining whether the first and second variable are contemporaneously live during execution of the compiled code; determining whether legal storage location sets for the first and second variables overlap when it is determined that the first and second variable are contemporaneously live during execution of the compiled code; comparing the priority tags assigned to each of the first and second variables when it is determined that the first and second variables are contemporaneously live during execution of the compiled code and have overlapping legal storage location sets; and subtracting, when the first and second variables have different priority tags, the legal storage location set of the higher priority variable from the legal storage location set of the lower priority variable to obtain a remainder set of storage locations; determining whether the remainder set of storage locations is empty; assigning the remainder set of storage locations to the variable with the lower priority tag as a new legal parameter set and proceeding with compiler operations when the remainder storage location set is not empty; and inserting an interference edge in an interference graph and proceeding with the compiler operations when the remainder set of storage locations is empty.