Patent ID: 7444626

Claim:
A method, in a data processing system, for optimizing instructions, comprising: receiving a set of instructions; performing linear dead store elimination on each instruction in the set of instructions to form partially optimized instructions, wherein the linear dead store elimination comprises: determining, for an instruction including a memory reference to a local variable, that the instruction is a dead store instruction with regard to the local variable; and writing a linear dead store elimination data structure entry into a linear dead store elimination data structure for the dead store instruction; traversing the linear dead store elimination data structure to identify linear dead store elimination data structure entries corresponding to store instructions that do not have matching linear dead store elimination data structure entries corresponding to load instructions; and removing the instructions from the set of instructions that have linear dead store elimination data structure entries corresponding to store instructions that do not have matching linear dead store elimination data structure entries corresponding to load instructions; and providing the partially optimized instructions to a conventional dead store elimination engine for performing traditional dead store elimination operations on the partially optimized instructions to generate optimized instructions.