Method and system for type demotion of expressions and variables by bitwise constant propagation
AssigneeIntel Corporation
InventorsWilliams Ludwell Harrison, III, Cotton Seed
Life of this patent
Estimating the term…
Abstract
A method and system for type demotion of expressions and variables by bitwise propagation is disclosed. In one embodiment, a method, comprises determining when an operation on a larger data type may be replaced by the operation on a smaller data type having a reduced precision, wherein the operation is contained in code associated with a language implementation system; and replacing the operation on the larger data type by the operation on the smaller data type.
Claims28
A method, comprising:
- analyzing code using bitwise constant propagation by a language implementation system to determine a backward value for each alias in the code that reflects any reference to the alias occurring outside of and following the code under analysis;
- determining whether an operation therein on a larger data type may be replaced with an operation on a smaller data type having a reduced precision, wherein the determining is based on the backward values of each alias in the analyzed code;
- and
- replacing the operation on the larger data type with the operation on the smaller data type if so determined.
A computer-readable medium having stored thereon a plurality of instructions, said plurality of instructions when executed by a computer, cause said computer to perform:
- analyzing code using bitwise constant propagation by a language implementation system to determine a backward value for each alias in the code that reflects any reference to the alias occurring outside of and following the code under analysis;
- determining whether an operation therein on a larger data type may be replaced with an operation on a smaller data type having a reduced precision, wherein the determining is based on the backward values of each alias in the analyzed code;
- and
- replacing the operation on the larger data type with the operation on the smaller data type if so determined.
A system, comprising:
- a processor;
- memory connected to the processor to store instructions for type demotion of expressions and variables by bitwise constant propagation, the instructions to be executed by the processor;
- storage connected to the processor to store a software code having a plurality of separately compilable routines;
- wherein the processor to execute the instructions on the code to:
- analyze code using bitwise constant propagation by a language implementation system to determine a backward value for each alias in the code that reflects any reference to the alias occurring outside of and following the code under analysis;
- determine whether an operation on a larger data type may be replaced with an operation therein on a smaller data type having a reduced precision, wherein the determining is based on the backward values of each alias in the analyzed code;
- and
- replace the operation on the larger data type with the operation on the smaller data type if so determined.
A system, comprising:
- means for analyzing code using bitwise constant propagation by a language implementation system to determine a backward value for each alias in the code that reflects any reference to the alias occurring outside of and following the code under analysis;
- means for determining whether an operation therein on a larger data type may be replaced with an operation on a smaller data type having a reduced precision, wherein the determining is based on the backward values of each alias in the analyzed code;
- and
- means for replacing the operation on the larger data type with the operation on the smaller data type if so determined.
Dependencies are inferred from the claim text.