Code Motion Based on Live Ranges in an Optimizing Compiler
AssigneeInternational Business Machines Corporation
InventorsShimin Cui, Raul Esteban Silvera
Life of this patent
Estimating the term…
Abstract
Optimizing program code in a static compiler by determining the live ranges of variables and determining which live ranges are candidates for moving code from the use site to the definition site of source code. Live ranges for variables in a flow graph are determined. Selected live ranges are determined as candidates in which code will be moved from a use site within the source code to a definition site within the source code. Optimization opportunities within the source code are identified based on the code motion.
Claims20
A method of compiler optimization, the method comprising:
- determining whether the identified live range is a candidate for code motion in the source code;
- designating, based on a live range analysis, a variables in source code that are candidates for a renaming of the variables;
- determining, based on a criteria, whether the variables of a live range are candidates for code motion in the source code;
- responsive to a positive determination, modifying the code at the definition and the use site;
- and
- optimizing the code in the compiler based on the modification.
A computer program product comprising computer recordable media including instructions, which when executed by a processor, performs actions that optimizes source code in a compiler, the actions comprising:
- determining whether an identified live range is a candidate for code motion in the source code;
- designating, based on a live range analysis, a variables in source code that are candidates for a renaming of the variables;
- determining, based on a criteria, whether the variables of a live range are candidates for code motion in the source code;
- responsive to a positive determination, modifying the code at the definition and the use sites;
- and
- optimizing the code in the compiler based on the modification.
A system that performs code optimization in a compiler, the system comprising:
- a processor;
- a memory coupled to the processor, the memory storing computer executable instructions, the instructions comprising:
- computer usable code that determines whether an identified live range is a candidate for code motion in the source code;
- computer usable code that designates, based on a live range analysis, variables in source code that are candidates for a renaming of the variables;
- computer usable code that determines, based on a criteria, whether the variables of a live range are candidates for code motion in the source code;
- computer usable code that, responsive to a positive determination, modifies the code at the definition and the use sites;
- and
- computer usable code that optimizes the code in the compiler based on the modification.
Dependencies are inferred from the claim text.