Time-stamp: <98/05/12 21:09:50 mitchell>

Frequently Asked Questions

  1. (6/4/98) (JF) In Project 2, the assignment stated we should only make Phi functions for pseudo registers. This does not seem to suffice for constant propagation. This is because Suif unnecessarily loads everything into temps before it loads them into pseudo registers. If we treat every temp as NONCONSTs (we would have to because they aren't in SSA form) there would be essentially no instructions that could be optimized. See the sample code below.
    • main() {
    • int a,b,c;
    • a = 3;
    • b = 4;
    • c = a + b; }
    • Procedure main:
    • ldc (s.32) t4 = 3
    • cpy (s.32) r1 = t4
    • ldc (s.32) t5 = 4
    • cpy (s.32) r2 = t5
    • add (s.32) t6 = r1, r2
    • cpy (s.32) r3 = t6
    • ldc (s.32) t7 = 0
    • ret t7


  2. (6/4/98) (JF) In Project 2, is the algorithm for Sparse Conditional Constant Prop. in the book correct? Consider the following example. How does symbolic execution ever reach the assignment to even3 on the second iteration of the loop?
  3. You have found a mistake in the algorithm in the book (and perhaps the paper, but its ambiguous). To fix it, you need to change the Visit_Phi routine. If the Lattice value of the Phi expression is lowered, then the outgoing SSA edges from the Phi assignment need to be placed on SSAWL.


  4. (5/12/98) (JF) Is the algorithm for renaming in the SSA article correct?


  5. (5/7/98) How should we print out variables?


  6. (5/7/98) Should still we print out the stuff from the first project for project 2?


  7. (4/16/98) How exactly should I print out the three outputs?


  8. (4/15/98) ****NICK MESS-UP ALERT!**** What's the definitive answer on basic block names?


  9. (4/15/98) ****NOTE: THIS ANSWER HAS CHANGED, AGAIN!**** What about empty basic blocks (those with no instructions)?


  10. (4/15/98) Does a RET mark the end of a basic block?


  11. (4/13/98) Can I modify doproc.c?


  12. (4/13/98) What do you mean by "concatenation" as far as basic block names?


  13. (4/13/98, updated 4/15/98) ****IMPORTANT**** What about those darn fall-throughs? simplesuif doesn't give them labels.


  14. (4/13/98) Why?


  15. (4/13/98) Whassup with the multiway branch?


  16. (4/13/98) Can I use the C++ graph implementation in the jumpstart directory?


  17. (4/9/98) Can we make any assumptions about the input to our CFG generator? I'm wondering if we should handle procedure calls and returns?