-------------------------------------------------------------------------- b2li Loop Invariant Code Motion using PRE (Partial Redundancy Elimination) -------------------------------------------------------------------------- Source file : b2li.c Compilation : gcc -c -O2 -fdump-tree-all b2li.c View result : vi -O b2li.c.*.ssa b2li.c.*.pre; rm -f b2li.c.* b2li.o Program ------- int foo(int x, int z) { int sum = 0; do { sum = sum + 1/x; } while(sum < z); return sum; } Question -------- 1 What happens to the computation of the expression "1/x"? Optional Question ----------------- 1 Can you guess why is the pass called "Partial Redundancy Elimination"? Hint: Compare with "Full Redundancy Elimination" that you observed in the previous assignment.