Method and system for identifying locations to move portions of the computer program
First Claim
1. A method in a computer system for optimizing a computer program, the method comprising:
- identifying a depth of a block of the computer program;
identifying an availability of an expression of the computer program; and
modifying the computer program when the identified availability of the expression and the identified depth of the block indicate that the expression can be moved to the block.
4 Assignments
0 Petitions
Accused Products
Abstract
A method system for optimizing a computer program. In one embodiment, the system identifies depths of blocks of a computer program and identifies the availability of expressions of the computer program. The system then modifies the computer program when he identified availability of the expression and the identified depth of a block indicate that the expression can be moved to the block. The depth of the block may represent the number of dominator blocks of that block. The availability of the expression may represent the depth of a block to which the expression may be moved. In one embodiment, when the identified availability of the expression is less than the identified depth of the block, the expression can be moved to the block.
84 Citations
80 Claims
-
1. A method in a computer system for optimizing a computer program, the method comprising:
-
identifying a depth of a block of the computer program;
identifying an availability of an expression of the computer program; and
modifying the computer program when the identified availability of the expression and the identified depth of the block indicate that the expression can be moved to the block. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
-
29. A method in a computer system for optimizing a computer program, the method comprising:
-
identifying a depth of a block of the computer program;
identifying an availability of an expression of the computer program; and
modifying the computer program when the identified availability of the expression and the identified depth of the block indicate that the expression can be moved to the block wherein the identified availability of the expression and the identified depth of the block indicate that the expression can be moved to the block when the identified availability of the expression is less than or equal to the identified depth of the block. - View Dependent Claims (40)
-
-
30. A method in a computer system for determining availability of expressions of a computer program, the method comprising:
-
for blocks visited during a forward traversal of a control flow graph representation of the computer program, for expressions of the block, setting the availability of expression to the latest availability of its operands, and when the operation of the expression is a load from memory, setting the availability of the expression based on a reaching definition of the load. - View Dependent Claims (31, 32, 33, 34, 35, 36)
-
-
37. A method in a computer system for identifying a direct dominator of a block of a computer program, the method comprising:
-
identifying the closest dominator of the block such that the block is contained in the innermost region containing that dominator; and
setting the direct dominator to the identified closest dominator.
-
-
38. A method in a computer system for identifying a direct dominator of a block of a computer program, the method comprising:
-
identifying the closest dominator of the block such that the block is contained in the innermost region containing that dominator by selecting the closest dominator of the block;
selecting the least common region that contains the region that contains the block and the region that contains the selected dominator of the block; and
while the selected least common region is not the same as the innermost region of the selected dominator of the block, selecting the next closest dominator of the block; and
selecting the least common region that contains the previously selected least common region and the region that contains the selected dominator of the block; and
setting the direct dominator to the identified closest dominator.
-
-
39. A computer system for identifying the availability of an expression in a computer program, the availability of the expression indicating a location within the computer program to which the expression can be moved with rewriting the expression, comprising:
-
a component for setting the availability of the expression to a maximum of depths of operands of the expression;
a component for, when an operation of the expression is a load from memory, setting the availability of the expression to a maximum of depths of operands of the expression and an availability of a reaching definition of the expression; and
a component for, when an operation of the expression is a store into memory, setting the availability of the expression to a depth of a parent block that contains the expression. - View Dependent Claims (41, 42, 43, 44)
-
-
45. A computer-readable medium containing instructions for controlling a computer system to modify a computer program, by a method comprising:
-
identifying a depth of a block of the computer program;
identifying an availability of an expression of the computer program; and
when the identified availability of the expression and the identified depth of the block indicate that the expression can be moved to the block, moving a rewritten version of the expression to the block. - View Dependent Claims (46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66)
-
-
67. A method in a computer system for modifying a computer program, the method comprising:
-
identifying a depth of a block of the computer program;
identifying a depth of an expression of the computer program; and
when the identified depth of the expression is less than or equal to the depth of the block, moving the expression to the block. - View Dependent Claims (68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80)
-
Specification