摘要:
Register halves are allocated independently when performing register allocation during program compilation, thereby effectively doubling the number of registers which are available for allocation, which in turn may reduce spill code and improve run-time performance. When hardware registers are 64 bits wide, for example, an architecture supporting the present invention provides some number of separate hardware instructions that operate on the 32-bit high-word and/or the 32-bit low word of the hardware registers as if those 32-bit words are separate registers. Such hardware instructions are able to manipulate the register halves independently, leaving the other register half untouched. A register coloring algorithm using in the compilation process is invoked using the number of register halves, instead of the number of hardware registers.
摘要:
Optimizing a program having a plurality of functions using an optimization technique that requires breaking a calling convention. A first function of the plurality of functions is modified as a result of optimizing. A name of the first function is mangled to form a unique first mangled name changing the name of the first function to include, as a result of mangling, first information conveying at least in part how the first function was modified. A second function of the plurality of functions, being a caller of the first function, is also modified to correctly invoke the first function using the unique first mangled name to apply the optimization technique. A compilation tool can, after optimizing, use the first information to take a first action with respect to the first procedure, wherein the compilation tool otherwise would require the calling convention to remain unbroken to take the first action.
摘要:
Register halves are allocated independently when performing register allocation during program compilation, thereby effectively doubling the number of registers which are available for allocation, which in turn may reduce spill code and improve run-time performance. When hardware registers are 64 bits wide, for example, an architecture supporting the present invention provides some number of separate hardware instructions that operate on the 32-bit high-word and/or the 32-bit low word of the hardware registers as if those 32-bit words are separate registers. Such hardware instructions are able to manipulate the register halves independently, leaving the other register half untouched. A register coloring algorithm using in the compilation process is invoked using the number of register halves, instead of the number of hardware registers.
摘要:
Optimizing a program having a plurality of functions. The program is optimized using an optimization technique that requires breaking a calling convention. The first function of the plurality of functions is modified as a result of optimizing. A name of the first function is mangled to form a unique first mangled name. Mangling comprises changing the name. The unique first mangled name includes, as a result of mangling, first information conveying at least in part how the first function was modified. A second function of the plurality of functions, being a caller of the first function, is also modified to correctly invoke first function using the unique first mangled name to apply the optimization technique. A compilation tool can, after optimizing, use the first information to take a first action with respect to the first procedure, wherein the compilation tool otherwise would require the calling convention to remain unbroken in order to take the first action.