1. A method, in a data processing system, for optimizing instructions, comprising: receiving a set of instructions; performing linear dead store elimination on the set of instructions, wherein the linear dead store elimination analyzes each instruction in the set of instructions to determine if the instruction includes a memory reference to a local variable and whether each instruction that references a local variable is a dead store instruction with regard to that local variable; generating partially optimized instructions based on the linear dead store elimination; and providing the partially optimized instructions to a conventional dead store elimination engine for generating optimized instructions.