Optimizing compilation of pointer variables in the presence of indirect function calls
AssigneeInternational Business Machines Corporation
InventorRoch G. Archambault
Life of this patent
Estimating the term…
Loading patent…
AssigneeInternational Business Machines Corporation
InventorRoch G. Archambault
Estimating the term…
Effective use of optimizing techniques during compilation is difficult in programs that make liberal use of pointers or indirect function calls. The indirection often means that the compiler cannot precisely determine the set of objects pointed to by a pointer at a specific location in the program, and therefore cannot efficiently eliminate pointer redundancies in the code. The present invention provides an optimising method that reduces the size of alias sets associated with program pointers. During an initial compilation phase, intraprocedural information about pointer variables referenced in each function of the program is gathered and saved in a data structure called the pointer alias graph. In the middle phase, the pointer alias graphs from all the compilation units for the program are combined to form a universal pointer alias graph and then transitive closure is performed on the universal pointer alias graph to produce a reduced graph containing the list of objects that each pointer variable can point to. In the final phase, all the files are re-compiled using the universal pointer alias graph as input, resolving all occurrences where pointer variables are de-referenced.
A method, during compilation, for optimizing a program with pointer variable references and indirect function calls, comprising:
A program storage device readable by machine tangibly embodying a program of instructions executable by the machine to perform method steps for optimizing a program with pointer variable references and indirect function calls during compilation, said method steps comprising:
In a two-pass optimizing compiler adapted to gather intraprocedural function information during an initial compilation pass, a method for reducing pointer alias sets for use in a program recompilation comprising:
Dependencies are inferred from the claim text.