Dynamic division optimization for a just-in-time compiler
AssigneeIntel Corporation
InventorsXiaohua Shi, Guei-Yuan Lueh, Zhiwei Ying
Life of this patent
Estimating the term…
Abstract
An arrangement is provided for improving the performance of a dynamic compiler, specifically for dynamically optimizing integer division operations. When a compiler receives an integer division code at runtime, the compiler dynamically profiles a divisor of the division code. The integer division code is then optimized based on the characteristics of the divisor, which are determined at runtime.
Claims41
A method for improving the performance of a dynamic compiler, comprising:
- receiving a first code;
- determining a strategy for optimizing a segment of the first code;
- optimizing the segment of the first code using the determined optimization strategy;
- and
- outputting a second code, representing the optimized first code.
An article comprising a machine accessible medium having content stored thereon, wherein when the content is accessed by a processor, the content provides for improving the performance of a dynamic compiler by:
- receiving a first code;
- determining a strategy for optimizing a segment of the first code;
- optimizing the segment of the first code using the determined optimization strategy;
- and
- outputting a second code, representing the optimized first code.
A compiling system, comprising:
- at least one pre-processing module to receive a first code in a high-level computer programming language;
- an optimization strategy selection mechanism to determine a strategy for optimizing a segment of the first code;
- at least one optimization mechanism to optimize the segment of the first code using the determined optimization strategy;
- a library to provide optimization implementations;
- and
- at least one post-processing module to generate a second code based on optimized segments of the first code and optimization implementations in the library.
A method for dynamically optimizing integer division operations, comprising:
- receiving a division code at runtime;
- identifying a divisor of the division code;
- updating information describing the divisor in a divisor cache, if the divisor is not invariant;
- preparing optimization parameters for the divisor, if the divisor becomes invariant for the first time during runtime;
- invoking a division implementation for an invariant divisor, using the optimization parameters.
An article comprising:
- a machine accessible medium having content stored thereon, wherein when the content is accessed by a processor, the content provides for dynamically optimizing integer division operations by:
- receiving a division code at runtime;
- identifying a divisor of the division code;
- updating information describing the divisor in a divisor cache, if the divisor is not invariant;
- preparing optimization parameters for the divisor, if the divisor becomes invariant for the first time during runtime;
- invoking a division implementation for an invariant divisor, using the optimization parameters.
A system for dynamically optimizing integer divisions, comprising:
- a divisor identifier to receive a division code at runtime and to identify a divisor of the division code;
- a divisor cache to store information describing divisors;
- a divisor profiling mechanism to profile divisors at runtime and to update the divisor cache;
- and
- an optimization preparation mechanism to prepare optimization parameters if the divisor becomes invariant for the first time during runtime.
Dependencies are inferred from the claim text.