Patent ID: 7478379

Claim:
A method of determining an execution order for machine instructions to reduce spill code, said method comprising the step of: from machine instructions that are ready for scheduling, scheduling the machine instructions for which an amount by which a size of a committed set of instructions would increase upon the scheduling of said machine instruction is smallest relative to the amount by which the size of the committed set of machine instructions for machine instructions ready for scheduling would increase upon scheduling of all said machine instructions, said committed set of machine instructions including any machine instruction that is already scheduled and any machine instruction that is descendent from an already scheduled machine instruction, for each of said machine instructions ready for scheduling, said amount being determined by identifying descendent machine instructions of each of said machine instructions; and determining which of said descendent machine instructions and said machine instructions is not in said committed set of machine instructions; determining an execution order for the machine instructions to reduce spill code, a given machine instruction being considered ready for scheduling when scheduling of said given machine instruction as a next machine instruction would not cause an erroneous programmatic result; and, undertaking the method when a risk of registers becoming overcommitted exceeds a certain threshold, said threshold being exceeded when processor register availability drops below a particular threshold as determined based upon a number of registers in use.