Loop-invariant code motion: Difference between revisions

Content deleted Content added
Spectatrix (talk | contribs)
m wikify
No edit summary
Line 1:
'''Loop -invariant code''' in an imperative [[Computer programming|programming]] language areconsists of statements, which could as well be placedmoved outside of the [[Control flow#Loops|loop]]:to before the loop, (if the loop always terminates), or behindafter the loop, whichwithout isaffecting semanticallythe moresemantics of the correctprogram.
Loop-invariant code motion is a compiler optimization which performs this movement automatically.