Patent ID: 7100156

Claim:
A method for determining the correctness of a potential interprocedural dead store optimization for an optimizing compiler, the optimizing compiler generating an intermediate representation of code to be compiled, including a call graph, the method comprising a top-down traversal of the call graph, and, for each procedure definition reached in the call graph traversal, further comprising: determining a live on exit set of interprocedural global variables for the reached procedure definition; determining a live on exit set of interprocedural global variables for each procedure call point within the reached procedure definition; storing the determined live on exit set of interprocedural global variables for each procedure call point in a live on exit data structure; and using the determined live on exit set of interprocedural global variables for the reached procedure definition to determine interprocedural global variables that are ineligible for interprocedural dead store elimination in the reached procedure definition.