Loop-Invariant Expressions The expression b +c is loop invariant assuming neither the variable b nor c is redefined within the loop. We can optimize the program by replacing all the re-executions in a loop by a single calculation outside the loop CS308 Compiler Theory 5Loop-Invariant Expressions • The expression b + c is loop invariant assuming neither the variable b nor c i d fi d i hi h l is re d efine d w i thin t he loop. • We can optimize the program by replacing all the re-executions in a loop by a single calculation outside the loop. CS308 Compiler Theory 5