Patent ID: 8448157

Claim:
A method, comprising: determining a plurality of virtual registers of a program that share a common property, the program comprising a plurality of basic blocks, associated with each one of the basic blocks is an in-state and an out-state; for each one of the basic blocks, initializing the corresponding out-state to comprise a set of real registers of a data processing system, where the set of real registers comprise a real register for each virtual register in the corresponding basic block; for each one of the basic blocks, determining which ones of the plurality of basic blocks comprise predecessor blocks, and setting the corresponding in-state equal to an intersection of the predecessor blocks; for each one of the basic blocks, allocating each one of the virtual registers to one of the real registers; and eliminating from a first one of the basic blocks a redundant program operation that establishes the common property if, upon entry into the first one of the basic blocks, a first real register already holds the common property.