Loop-invariant code motion: Difference between revisions

Content deleted Content added
Augmented tags. I presume it is C. Could be Java.
Really bad example this loop is entirely unnecessary.
Line 30:
</source>
 
It might then occur to us that the since the loop exit value of <code>j</code> must fall between <code> maxval - calcval</code> and <code>maxval + calcval</code>, or if not it was already beyond that range, then there is no need for the loop at all.
[[Category:Compiler optimizations]]