CSC455 - Compilers

Team: Peanut Butter Tortoise

"Slow and steady wins the race."

Team Members : Roles

  • Chetan Bhole : Team Lead, Developer, Tester
  • Stan Park : Tester, Reporter
  • Amal Fahad : Developer, GCC Guru

Project Vision

  • Eat peanut butter.
  • Beat hare.

Project Plan

Performance is secondary. The main goal is to try to have correct code.

The following is the current tentative plan:

  • Decide how we will fuse the code created by different team members.
  • Find bugs that were present in the system.
  • Rectify bugs.
  • Brainstorm for ideas for improving performance of the system.

Session Summaries

080330

  • Time open: 9PM

    Developer: Amal

    Constant propagation part:

    the code I have now is able to:

    • propagate constant within a block
    • propagate a constant between continuous blocks as long as it appears in the set of all previous blocks of our block, and being assigned the same value in all, and not being killed in any of them
    • also check if any of the function arguments might be substituted with a constant.
    • handle a case:
      • b=10;
      • c=5;
      • a=b+c;
      • the code I have will generate a=10 and add a to the set of the constant list , and the const_propagation function will be called again just in case a occur some where else later and can be substitute again by 10.
      what I need handle also :
      • handle the global variable
      • and check the code on the different open test cases
        • the first test case Fibonaccia, the count i got: 319
        • the second test case Jacobi the count I got: 788995
        • the third test case mandel the count I got: 1784219
        • the fourth test case automaton the count I got: 31
        • the fourth test case movingedge the count I got:235
        • the fourth test case sort the count I got: 1478

    • Time open: 840PM

      Developers:Stan

      Tasks:

      • Modify defuse construction to add information about number of uses
      • Add pass to fold "a & 1" and "a/a"
      • Write specific test cases to exercise the passes.

      Change log:

      • Added "static int num_defuses(defuse_list_t *defuse_list, tree used)": Given a stmt "used", which is assumed to be of the form "x = a", returns the number of uses of "a"
      • Added "static void mega_fold(void)": Pass to handle folding for "a/a", "a&1", "1&a", "a%a". All code for manipulation is in place but only "&" works.

      Open issues:

      • Cannot currently determine the type of the operands in "/" and "%" so the folding isn't carried out.

      Time close: 1050PM

    • Time open: 745PM

      Attendees: Amal, Chetan, Stan

      Minute taker: Stan

      Agenda:

      • Discuss current status of const prop and VN
      • Identify some cases for further optimatization

      Discussion:

      • GCC will fold binary exprs involving 0 and 1 except for "a & 1" and "a/a"
      • VN for individual variables, more like propagation for particular variables

      Conclusions:

      • AI[4] for Stan: Add a pass to handle "a & 1" and "a/a"
      • AI[5] for Stan: Modify defuse construction to include information needed by Chetan's variable propagation.

      Open issues:

      • VN isn't handling both operands of a binary expr

      Time close: 834PM

    080329

    • Time open: 940PM

      Developers: Stan

      Tasks:

      • Add optimization pass to remove stmts of the format "x=x" which are generated by VN but not removed by dead code elimination.

      Change log:

      • Added pass "self_assign()" which removes stmts of the format "x=x"

      Open issues:

      • None.

      Time close: 945PM

    • Time: 700PM

      Attendees: Amal, Chetan, Stan

      Minute taker: Stan

      Agenda:

      • Go over pre-pass gimple code to look for missed optimizations.

      Discussion:

      • Constant prop is not folding stmts
      • Unary ops not handled in VN
      • AI[1] complete. Benchmark results posted earlier.

      Conclusions:

      • AI[2] for ALL: fix bugs in current optimizations
      • AI[3] for Stan: develop comprehensive test program to try to exercise the optimizations.

      Open issues:

      • DVN or SVN?
      • Additional optimizations?
      • Need more peanut butter.

      Time close: 749PM

    • Time open: 300PM

      Developers: Stan

      Tasks:

      • Merge updated VN and const prop
      • Make defuse and dead code marking more intelligent for arrays
      • Recheck some benchmarks

      Change log:

      • Updated Chetan's VN
      • Updated Amal's const prop
      • Modified find_uses():
        • When checking for the uses of an array, added comparison for base array equality
        • Made function calls a def kill for globals
        • Made function call with pass-by-ref a def kill
      • Modified defuse_list_el_t:
        • Added "int global" flag
        • Added "int array" flag
      • Modified dead_code_elim:
        • Removed auto-marking for array accesses
        • Added marking for global defs
      • trivia benchmark count: 76 -> 73

      Open issues:

      • jacobi, multiply, and sort benchmarks are unchanged

      Time close: 416PM

      -- StanPark - 29 Mar 2008

    080328

    • Time open: 500PM

      Developers: Chetan

      Change log:

      • Corrected value numbering to take care of global variables.
      • Removed a bug to now detect constants in the modify expression.
      • Created gimple output files for the given open test cases to analyse for optimization

      Open issues:

      • Will we need to take care of value numbering for functions other than printf and scanf for the test cases?

      Time close: 515PM

      -- ChetanBhole - 28 Mar 2008

    080326

    • Time open: 800PM

      Developers: Chetan, Stan

      Tasks:

      • Merge code for open benchmarking.

      Change log:

      • Added Chetan's value numbering to Stan's. Due to bugs, benchmarks were produced using only Stan's code.

      Open issues:

      • Chetan has unresolved bugs in value numbering.

      Time close: 831PM

      -- StanPark - 26 Mar 2008

    • Time open: 700PM

      Attendees: Amal, Chetan, Stan

      Minute taker: Stan

      Agenda:

      • Code merge for initial benchmarks

      Discussion:

      • Use of VEC or linked lists.
      • Use of global structures for holding data flow information

      Conclusions:

      • AI[1] for Stan, Chetan: For initial benchmarking, use Stan's dead code and constant prop and Chetan's value numbering as well as running Stan's and Chetan's code bases separately.
      • Amal will try VEC but has Stan's code for linked lists if necessary.
      • Try to keep each pass as independent as possible for debugging purposes, so each pass will keep its own bookkeeping structures.
      • AI[2] for ALL: Fix bugs in all passes.

      Open issues:

      • DVN or SVN?
      • Fix bugs in all passes.
      • Additional optimizations?
      • Need more peanut butter.

      Time close: 751PM

    080325

    • Time open: 630PM

      Attendees: Chetan, Amal, Stan

      Minute taker: Stan

      Agenda:

      • Who has working optimizations
      • Code merging

      Discussion:

      • Chetan has value numbering. Bugs:
        • Doesn't include initial constants
        • Globals
        • Function parameters
      • Amal has constant prop. Bugs:
        • Constants only propagate from the immediate predecessor
      • Stan has dead code elimination. Bugs:
        • Immediately marks array accesses

      Conclusions:

      • None

      Open issues:

      • DVN or SVN?
      • Fix bugs in all passes.
      • Additional optimizations?
      • Need more peanut butter.

      Time close: 706PM

      -- StanPark - 25 Mar 2008

    080324

    Tag and Naushad stole our idea of having a motto. And they may claim that we will claim that it is stolen. -- StanPark - 24 Mar 2008

    080323

    Made this wiki page today. -- StanPark - 23 Mar 2008

Edit | Attach | Watch | Print version | History: r36 | r22 < r21 < r20 < r19 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r20 - 2008-03-31 - AmalFahad
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback