Changes between Version 14 and Version 15 of Commentary/Compiler/IntegratedCodeGen


Ignore:
Timestamp:
Jun 6, 2008 10:57:27 AM (6 years ago)
Author:
dias
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/IntegratedCodeGen

    v14 v15  
    6666 
    6767 0. Convert from {{{STG}}} to an abstract {{{CmmAgraph}}} ([[GhcFile(compiler/cmm/ZipCfg.hs)]], [[GhcFile(compiler/cmm/ZipCfgCmmRep.hs)]]).  This step is Simon PJ's "new code generator" from September 2007.  One departure from the old code generator is that '''we do not build a {{{Cmm}}} abstract-syntax tree;''' instead we go straight to a control-flow graph. 
    68  0. Reify the control-flow graph in a non-abstract form that can be analyzed, transformed, and optimized: convert {{{CmmAgraph -> CmmGraph}}}.  This conversion may instroduce new variables, stack slots, and compile-time constants.  
     68 0. Reify the control-flow graph in a non-abstract form that can be analyzed, transformed, and optimized: convert {{{CmmAgraph -> CmmGraph}}}.  This conversion may introduce new variables, stack slots, and compile-time constants.  
    6969   * Implements calling conventions for call, jump, and return instructions: all parameter passing is turned into data-movement instructions (register-to-register move, load, or store), and stack-pointer adjustments are inserted. After this point, calls, returns, and jumps are just control-transfer instructions -- the parameter passing has been compiled away.   
    7070   * How do we refer to locations on the stack when we haven't laid it out yet? The compiler names a stack slot using the idea of a "late compile-time constant," which is just a symbolic constant that will be replaced with an actual stack offset when the stack layout is chosen.