Patent ID: 7617495

Claim:
A computer-implemented method of scheduling a plurality of instructions generated by a compiler based on an intermediate representation of source code, the method comprising: for each of one or more of the plurality of instructions of one or more instruction types ready to be scheduled in a given cycle in a scheduling region, determining a new slack value based on a current maximum number of the instructions that can be scheduled in the given cycle for a target processor, wherein determining the new slack value comprises: determining a minimum number of cycles needed to schedule each instruction in the scheduling region, taking resource height for each instruction into account, wherein the resource height is determined based on each resource availability for each instruction type to which each instruction belongs; determining a dependence deadline based on a dependence height for each instruction and the minimum number of cycles, wherein the dependence height is determined based on a total height of a subgraph of a dependence graph of the scheduling region, and wherein the subgraph comprises one or more nodes to represent directly and indirectly dependent instructions of each instruction; and determining a resource deadline based on the resource height and the minimum number of cycles; selecting up to the current maximum number of instructions from those instructions ready to be scheduled in the given cycle, based on a priority order associated with the new slack value; and scheduling the selected instructions.