System and method to efficiently represent aliases and indirect memory operations in static single assignment form during compilation
First Claim
1. A method for representing aliases in single static assignment (SSA) during compilation of a program, comprising the steps of:
- (a) converting scalar variables of said program to SSA form, said SSA form including a plurality of variable versions, zero or more occurrences of a χ
function, zero or more occurrences of a φ
function, and a zero or more occurrences of a μ
function, wherein said χ
function, said φ
function, and said μ
function are inserted for one or more of said variable versions;
(b) determining whether each one of said variable versions can be renamed to a zero version; and
(c) renaming one or more of said variable versions to said zero version.
5 Assignments
0 Petitions
Accused Products
Abstract
A system and method for an optimizer of a compilation suite for representing aliases and indirect memory operations in static single assignment (SSA) during compilation of a program having one or more basic blocks of source code. The optimizer converts all scalar variables of said program to SSA form, wherein said SSA form includes a plurality of variable versions, zero or more occurrences of a χ function, zero or more occurences of a φ function, and zero or more occurrences of a μ function. The χ function, φ function, and μ function are inserted for the variable versions. The optimizer also determines whether a variable version can be renamed to a zero version, and upon such a determination, the optimizer renames the variable version to a zero version. The optimizer further converts all indirect variables of a program to SSA form, wherein the SSA form includes a plurality of virtual variable versions such that a virtual variable is assigned to an indirect variable, zero or more occurrences of a χ function, zero or more occurences of a φ function, and zero or more occurrences of a μ function. The χ function, φ function, and μ function are inserted for the virtual variables. The optimizer hashes a unique value number and creates a corresponding hash table entry for each variable version and each virtual variable remaining after renaming all zero versions. The optimizer also applies global value numbering to each basic block of the program.
19 Citations
16 Claims
-
1. A method for representing aliases in single static assignment (SSA) during compilation of a program, comprising the steps of:
-
(a) converting scalar variables of said program to SSA form, said SSA form including a plurality of variable versions, zero or more occurrences of a χ
function, zero or more occurrences of a φ
function, and a zero or more occurrences of a μ
function, wherein said χ
function, said φ
function, and said μ
function are inserted for one or more of said variable versions;(b) determining whether each one of said variable versions can be renamed to a zero version; and (c) renaming one or more of said variable versions to said zero version. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. An optimizer for representing aliases in single static assignment (SSA) during compilation of a program, comprising:
-
SSA scalar means for converting scalar variables of the program to SSA form, said SSA form including a plurality of variable versions; and zero version generating means for generating zero versions for non-real occurrences of said variable versions. - View Dependent Claims (8, 9, 10, 11)
-
-
12. A computer, comprising:
-
a processor; and SSA scalar means for enabling said processor to convert scalar variables of a program residing within memory of the computer to SSA form, said SSA form including a plurality of variable versions; and zero version generating means for enabling said processor to generate zero versions for non-real occurrences of said variable versions. - View Dependent Claims (13, 14, 15, 16)
-
Specification