--------- A-3 Loops --------- Compile the following program (file A-3.c) and observe the dumps. Source file : A-3.c Compilation : gcc-4.7.2 -c -fdump-tree-cfg A-3.c View result : vi -O A-3.c A-3.c.*.cfg Clear dumps : rm -f A-3.c.* A-3.o Program ------- int main() { int sum = 0; int i, j; while(sum < 100) { sum = sum * 2; } for(i=0; i<25; i++) { for(j=0; j<50; j++) { sum = sum + i*j; } } } Questions --------- 1 Identify the basic blocks that correspond to the while loop. How is the GIMPLE for a while loop different from simple if-else jumps? 2 Identify the basic blocks for the nested for-loop. You should be able to identify intializers, conditions and increments for each loop as well as the shared inner body. Is there really anything special about a for-loop as compared to a while-loop?