Patent ID: 7350061

Claim:
A computer-implemented method for reversing a conditional branch on a computer architecture that supports a predicated execution, comprising: determining a conditional branch to reverse from compiler runtime data; obtaining a predicate expression having a condition that triggers a direction of program flow of the conditional branch to be reversed; determining an inverse of the predicate expression that executes the conditional branch when an opposite condition is true; determining whether at least one predicate in the inverse predicate expression is unmaterialized, and, if so, materializing the unmaterialized predicate, wherein materializing the unmaterialized predicate includes locating a free register to support the unmaterialized predicate, associating a new predicate with the free register, and adding an instruction to define the new predicate as the unmaterialized predicate, wherein the unmaterialized predicate is now materialized; and applying the inverse of the predicate expression to the conditional branch to reverse the conditional branch.