Changes between Version 12 and Version 13 of Commentary/Compiler/NewCodeGen


Ignore:
Timestamp:
Jan 18, 2008 3:17:34 PM (6 years ago)
Author:
guest
Comment:

elaborated items on the todo list in some detail

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/NewCodeGen

    v12 v13  
    99   * Common block elmination: to do 
    1010   * Block concatenation: to do 
    11  * Adams optimisation: currently done somewhere but not modularly.  I think. 
    12  * Proc-point analysis and transformation: done? 
    13  * Add spill/reload: done? 
    14  * Stack slot alloction? 
     11 * Adams optimisation: currently done in cmm/CmmProcPointZ, which is incomplete because it does not insert the correct CopyOut nodes.  The Adams optimization should be divorced from this module and replaced with common-block elimination, to be done after the proc-point transformation.  In principle this combination may be slightly less effective than the current code, since the selection of proc-point protocols is guided by Adams's criteria, but NR thinks it will be easy to get the common, important cases nailed. 
     12 * Proc-point analysis and transformation: 'working' but incomplete and incorrect in the sense that CopyIn nodes are created without all the required dual CopyOut nodes.  There is still no coherent plan for calling conventions, and the lack of such a plan prevents the completion of proc-point analysis, as in principle it should come up with a calling convention for each freely chosen proc point.  In practice NR recommends the following procedure: 
     13    * All optional proc points to be generated with no parameters (all live variables on the stack) 
     14    * This situation to be remedied when the code generator is reorganized along the lines NR proposed in July 2007, i.e., the register allocator runs on C-- with calls (as opposed to C-- with jumps only) and therefore ''before'' proc-point analysis 
     15 * Add spill/reload: Implemented to NR's satisfaction in cmm/CmmSpillReload.hs, with the proviso that spilling is done to ''abstract'' stack slots rather than real stack positions (see comments below on stack-slot allocation) 
     16 * Stack slot allocation: nothing here but some broken bits and pieces.  Progress in this arena is blocked by the lack of a full understanding of how to do stack-frame layout and how to deal with calling conventions.  NR proposes that life would be simplified if ''all'' calls downstream from the Cmm converter were to be parameterless---the idea being to handle the calling conventions ''here'' and to put arguments and results in their conventional locations. 
    1517 * Make stack explicit: to do 
    1618 * Split into multiple !CmmProcs: to do 
     
    1921 0. New code to check invariants of output from `ZipDataflow` 
    2022 0. Finish debugging `ZipDataflow` 
    21  0. Use Simon PJ's 'common-blockifier' to move the Adams optimization outside `CmmProcProintZ` 
     23 0. Use Simon PJ's 'common-blockifier' (which does not exist!!!) to move the Adams optimization outside `CmmProcProintZ` 
    2224 0. ProcPointZ does not insert `CopyOut` nodes; this omission must be rectified and will require some general infrastructure for inserting predecessors. 
    2325 0. Simple optimizations on `CopyIn` and `CopyOut` may be required 
     
    3032!ToDo: main issues 
    3133 * SRTs simply record live global variables.  So we should use the same live-variable framework as for live local variables.  That means we must be able to identify which globals are SRT-able.  What about compression/encoding schemes? 
    32  
    33  * Draining the Rep swamp. 
    3434 
    3535 * How do we write continuations in the RTS?  E.g. the update-frame continuation?  Michael Adams had a syntax with two sets of parameters, the the ones on the stack and the return values.