NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

If-conversion

From Texas Instruments Wiki
Jump to: navigation, search

If-conversion is the optimization that deletes a branch around an instruction and replaces it with a predicate on the instruction.

Typically, an "if-then" statement causes the compiler to create a conditional branch instruction to branch around the "then" code if the if-condition evaluates to false. If-conversion removes the branch and predicates the instructions in the "then" (and "else") portions of the if statement. If-conversion may be required for a loop to be software pipelined.