摘要:
Briefly, in one embodiment, the invention is a method for eliminating common subexpressions in an initial SSA intermediate language representation of at least a portion of a computer program. The method includes (a) inserting a phi-node for an unambiguous definition used in an unambiguous subexpression reaching a join point in the initial intermediate language subsequent to the join point; (b) inserting a phi-node for the unambiguous common subexpression; (c) renaming the unambiguous definition and a subsequent use reached by the definition; and (d) renaming the unambiguous common subexpression.
摘要:
A computer implemented method for determining the set of variables that may be ambiguously defined at a point in a computer program includes first placing all variables contained in at least a portion of the computer program into the set. Next, a definition of a variable in at least a portion of the computer program is located. Then, if the definition unambiguously defines the variable, then the variable is removed from the set. Otherwise, if the definition is an ambiguous definition, then all the variables contained in the portion of the computer program are placed into the set.
摘要:
The invention is a method of using static single assignment intermediate language to color out artificial register dependencies while compiling at least a portion of a computer program. The method comprises creating a rank-n SSA intermediate language representation of the computer program, wherein n is a positive integer greater than 1; and coloring out the artificial register dependencies.
摘要:
The invention, in one embodiment is a method of creating a rank-n static single assignment intermediate language from a rank-(n-1) static single assignment intermediate language, where n is a positive integer. The method includes searching the rank-(n-1) static single assignment intermediate language for a rank-1 definition that reaches at least one use; and renaming the rank-1 definition and the at least one use to a compiler temporary.
摘要:
A method for optimizing a loop in a computer program. The loop contains at least a first statement that uses a variable. The method includes inserting a second statement that loads the variable. The second statement is inserted prior to the loop. The method also includes inserting a third statement that (i) checks whether the variable has been written to at any point between the second statement and the third statement and if and only if the variable has been written to, then loading the variable.
摘要:
The invention, in one embodiment, is a method for compiling at least a portion of a computer program. The method includes (a) inserting a phi-function for a global variable reaching a join point in the intermediate language representation subsequent to the join point without regard to the presence of ambiguity; (b) renaming a definition and any subsequent use of the definition in the intermediate language representation; and (c) identifying a partially redundant load by determining whether any of the operands of the inserted phi-function have not been renamed.
摘要:
The invention in one embodiment is a method for identifying partially redundant loads in an SSA intermediate language representation of at least a portion of a computer program. The intermediate language representation in this embodiment includes an inserted phi-function and the definitions and their uses have been renamed. The method includes identifying a partially redundant load by determining whether one of the operands in the inserted phi-function is unregisterized.