Jump to content

Loop-invariant code motion

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 62.109.122.125 (talk) at 20:26, 11 July 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Loop invariant code in an imperative programming language are statements, which could as well be placed outside of the loop: before the loop, if the loop always terminates or behind the loop, which is semantically more correct.