15-745 Advanced Optimizing Compilers: WorksheetOptionalApril 25, 20061. Suppose we were to add setjmp() and long jmp() to L3. Briefly explain the changes you wouldhave to make to your compiler, starting with the construction of the flowgraph and the impacton the dataflow analyses and optimizations we have implemented this semester.2. Is there a difference in running time between computing iterative dataflow analysis in termsof both in() and out() sets, vs using only one of them?3. Give an example of a lattice that is not strongly distributive.4. Give an example of a specific dataflow analysis problem and an instance for which the MOPand MFP solutions are different.5. Draw the lattice of monotone functions from BV2 to itself.6. What are the flow, anti, and output dependences in the following basic block?r1 = [r7+4]r2 = [r7+8]r3 = r2 + 2r4 = r1 + r2[r5] = r4r4 = r5 - r3[r5] = r4[r7+r2] = r3r4 = r3 + r4r3 = r7 + r4r7 = r7 + 27. Formulate the dataflow analysis that is the inverse of available expressions, ie, the backward-flow problem in which an expression is in EVAL(i) if it is evaluated in block i and none of thevariables in it are changed between the entrance to the block and the given evaluation, withthe path-combining operator being intersection. Is there an optimization problem for whichthis analysis is useful?18. Consider the following loop:for (i=0; i<N; i++)A[i] = A[i] + B * C[i];Rewrite this code (in either source code form or in any suitable pseudo-assembler) in software-pipelined
View Full Document