摘要:
A method to eliminate redundant store and load instruction pairs in the optimization of a stack-based language comprises determining data dependencies within a sequence of instructions, identifying a store-load instruction pair within the sequence of instructions, identifying one or more stack location insensitive sequences between the store-load instruction pair that enclose one or more of the data dependencies, reordering the one or more stack location insensitive sequences based on the data dependencies to place the two instructions of the store-load instruction pair immediately adjacent to each other, and removing the store-load instruction pair.