Content deleted Content added
Line 1:
{{Unreferenced|date=May 2007}}
In [[computer programming]], '''loop-invariant code''' consists of statements or expressions (in an [[imperative programming|imperative]] [[programming language]]) which can be moved outside the body of a loop without affecting the semantics of the program, because it does not change during the loop: they are [[loop invariant]]s. '''Loop-invariant code motion''' (also called '''hoisting''' or '''scalar promotion''') is a [[compiler optimization]] which performs this movement automatically.
==Example==
|