------------------- b3lu Loop Unrolling ------------------- In this program we observe how loops can be unrolled by repeating the loop body if the compile time estimate of the loop count is available and unrolling does not become too large. Source file : b3lu.c Compilation : gcc -c -O2 -fdump-tree-all b3lu.c View result : vi -O b3lu.c.*.ssa b3lu.c.*.cunroll; rm -f b3lu.c.* b3lu.o Program ------- int N; int main() { int i, a = 10; for(i= 0; i < 4; i++) { a = a + N; }; return a; } Questions --------- 1 What will happen if "a = a + N" is replaced by "a = a + 1"?