Changes between Version 22 and Version 23 of Commentary/Compiler/NewCodeGen


Ignore:
Timestamp:
Aug 27, 2008 7:38:59 AM (7 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/NewCodeGen

    v22 v23  
    99 * #2253 
    1010 
    11 Status: 
     11== Notes about the state of play in late 2007 == 
     12 
     13These notes are largely out of date, but I don't want to dump them till we're sure that we've sucked all the juice out of them. 
     14  
    1215 * The Rep swamp is drained: see [wiki:Commentary/Compiler/BackEndTypes] 
    1316 * Code generator: first draft done. 
     
    5659 * (SLPJ) See let-no-escape todos in `StgCmmExpr`. 
    5760 
    58 == The new Cmm data type == 
    59  
    60 There is a new Cmm data type: 
    61  
    62  * [[GhcFile(compiler/cmm/ZipCfg.hs)]] contains a generic zipper-based control-flow graph data type.  It is generic in the sense that it's polymorphic in the type of '''middle nodes''' and '''last nodes''' of a block.  (Middle nodes don't do control transfers; last nodes only do control transfers.)  There are extensive notes at the start of the module.[[BR]][[BR]] 
    63  The key types it defines are: 
    64    * Block identifiers: `BlockId`, `BlockEnv`, `BlockSet` 
    65    * Control-flow blocks: `Block` 
    66    * Control-flow graphs: `Graph`[[BR]][[BR]] 
    67  * '''`ZipDataFlow`''' contains a generic framework for solving dataflow problems over `ZipCfg`.[[BR]][[BR]] 
    68  * '''[[GhcFile(compiler/cmm/ZipCfgCmmRep.hs)]]''' instantiates `ZipCfg` for Cmm, by defining types `Middle` and `Last` and using these to instantiate the polymorphic fields of `ZipCfg`.  It also defines a bunch of smart constructor (`mkJump`, `mkAssign`, `mkCmmIfThenElse` etc) which make it easy to build `CmmGraph`.[[BR]][[BR]] 
    69  * '''`CmmExpr`''' contains the data types for Cmm expressions, registers, and the like.  It does not depend on the dataflow framework at all. 
    70  
    71 ----------------------------------- 
    72 == Runtime system == 
    73  
    74  * '''Garbage collector entry points''': see `Note [Heap checks]` in `StgCmmHeapery`. 
    75  
    76  * '''PAPs''' 
    77   
    78  * '''Update frames''' and '''exception handling'''.  Also STM frames. 
    79  
    80  * '''Primitives''' can be rewritten: 
    81    * Use parameters 
    82    * In a few cases, use native calls (notably eval) 
    83