摘要 |
An improved optimizer, in conjunction with a set of initial instruction ordinal assignment policies, a set of instruction ordinal adjustment policies and a set of instruction ordinal to instruction operation size mapping policies, is provided to the code generator of a compiler of the target machine. In addition to logic for performing standard optimizations, the improved optimizer further comprises logic for assigning initial instruction ordinals to instructions in the code being generated for the program being compiled in accordance to the assignment policies, iteratively adjusting the assigned instruction ordinals in accordance to the adjustment policies until they converge into a set of compatible and optimized instruction ordinals, and mapping the final instruction ordinals to instruction operation sizes, inserting additional code where necessary, in accordance to the mapping policies.
|