Loop-invariant Code Motion - Invariant Code Detection

Invariant Code Detection

Usually a reaching definitions analysis is used to detect whether a statement or expression is loop invariant.

For example, if all reaching definitions for the operands of some simple expression are outside of the loop, the expression can be moved out of the loop.

Read more about this topic:  Loop-invariant Code Motion

Famous quotes containing the word code:

    “Acknowledge your will and speak to us all, “This alone is what I will to be!” Hang your own penal code up above you: we want to be its enforcers!”
    —Friedrich Nietzsche (1844–1900)