Patent Title: Optimizing compilation of pointer variables in the presence of indirect function calls
Abstract: 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.