1. A method for code optimization, comprising: disassembling object code that has been compiled and linked; identifying a function in the disassembled code, the function including store and restore instructions with respect to a register; analyzing the disassembled code to locate a call to the function followed by an instruction to kill the register; and modifying the code so as to eliminate the store instruction from the function when the function is invoked by the located call.