Patent Document ID: 6064820
Application ID: 09085299

Base Claim:
1. A computer implemented method for optimizing in a source program that executes on a computer, comprising: representing the source program having at least one loop, and at least one instruction having at least one variable, by a graph including a plurality of nodes, each node including at least one of the instructions, having the following steps: a. including a definition instruction, that establishes at least one original name variable, at least one cloned name variable, or at least one incarnation name variable; b. including a use instruction that includes use of the original name, use of the cloned name, or use of the incarnation name; c. maintaining correspondence between the cloned name and the original name; d. including a set of at least one first instruction that identifies nodes having the definition instructions and the identified nodes are inside of the loop; e. including a set of at least one second instruction that identifies nodes having the use instructions and the identified nodes being outside of the loop; f. including a set of at least one tail node; g. including a set of at least one third instruction having the original names that are in both the first instruction set and the second instruction set; h. wherein, for each tail node in the set of tail nodes: i. wherein, when the original name is in the tail node and the third instruction set, inserting in the tail node a cloned definition instruction that establishes the cloned name by the correspondence to the original name; and ii. wherein, for all the use instructions that are also in the second instruction set, when the original name is used, and when the cloned name is established in the cloned definition instruction, replacing the original name with the corresponding cloned name; and i. generating an executable module from the graph that executes on the computer thereby optimizing the source program that executes on the computer with the cloned name.

---

Claim 6:
6. The method for optimizing a source program as set forth in claim 1, wherein replacing the original name with the corresponding cloned name in step h(ii), further comprises: establishing when the correspondence of the all uses of the original name that are also in the second instruction set, is between more than one of the cloned names, and for each of the use instructions that is in the second instruction set and that is not in the tail node set: 1. including an incoming names set; 2. including a fourth instruction that corresponds to the use instruction that is the second instruction set and that is not in the tail node set; 3. including a first node that includes the fourth instruction and that includes use of at least one of the original names; 4. wherein, for each node that precedes the first node: i. labeling the node that precedes the first node as a second node; ii. including a new name variable; iii. searching in the second node for the correspondence between the original name and the cloned name; iv. assigning the new name the cloned name when the correspondence between the original name and the cloned name is found; v. adding the new name to the incoming names set; and vi. repeating steps 4(i) through 4(v) until all the correspondence between the original name and the cloned name has been found; 5. if the incoming names set has more than one member, merging the members of the incoming names set into a fifth variable, and setting the cloned name to the fifth variable thereby optimizing the source program by establishing the new name; and 6. if the incoming names set has one member, setting the cloned name to the one member of the incoming names set thereby optimizing the source program that executes on the computer by establishing the new name.