Method and apparatus for maintaining exception reporting for register promotion
AssigneeIntel Corporation
InventorGuei-Yuan Lueh
Life of this patent
Estimating the term…
Abstract
A method and apparatus which comprises, as part of compiling source code into native code, identifying a source code block in the source code to optimize using register promotion, and optimizing the source code block using a register promotion transformation. Thereafter, compensation native code is generated to update those memory locations whose values were promoted using register promotion with the up-to-date values from registers associated with the memory locations. As a result native code corresponding to any existing source code exception handler associated with the source code block will have access to the up-to-date memory locations during program execution.
Claims19
A method comprising
- identifying a source code block in source code;
- transforming the source code block including transforming references to values stored in memory locations into references to corresponding values stored in registers associated with the memory locations;
- and
- generating compensation native code to update each memory location with a value from an associated register to provide native code corresponding to a source code exception handler associated with the source code block, access to the updated memory locations.
A machine-readable medium that provides instructions, which when executed by a processor, cause the processor to perform operations comprising:
- identifying a source code block in source code;
- transforming the source code block, including transforming references to values stored in memory locations into references to corresponding values stored in registers associated with the memory locations;
- and
- generating compensation native code to update each memory location with a value from an associated register to provide native code corresponding to a source code exception handler associated with the source code block, access to the updated memory locations.
An apparatus for compiling source code into native code comprising:
- a processor and a memory coupled thereto;
- an identifier to identify a source code block in source code;
- a transformer to transform the source code block, including transforming references to values stored in memory locations into references to corresponding values stored in registers associated with the memory locations;
- and
- a compensator to generate compensation native code to update each memory location with a value from an associated register to provide native code corresponding to a source code exception handler associated with the source code block, access to the updated memory locations.
Dependencies are inferred from the claim text.