Changes between Version 36 and Version 37 of Commentary/Compiler/NewCodeGenPipeline


Ignore:
Timestamp:
Jun 14, 2011 12:32:14 PM (3 years ago)
Author:
ezyang
Comment:

Adjust docs for some renaming

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/NewCodeGenPipeline

    v36 v37  
    99  1. Convert STG to Cmm, with implicit stack implicit, and native Cmm calls. 
    1010  2. Optimise the Cmm, and CPS-convert it to have an explicit stack, and no native calls. 
    11      This part of the pipeline is stitched together in `cmm/CmmCPSZ.hs`. 
     11     This part of the pipeline is stitched together in `cmm/CmmPipeline.hs`. 
    1212  3. Feed the CPS-converted Cmm to the existing, unmodified native code generators. 
    1313 
     
    2525     * Making the calling convention explicit includes an explicit store instruction of the return address, which is stored explicitly on the stack in the same way as overflow parameters. This is done (obscurely) in `MkGraph.mkCall`. 
    2626 
    27  * '''Simple control flow optimisation''', implemented in `CmmContFlowOpt`, called from `HscMain.tryNewCodeGen` (weirdly).  It's called both at the beginning and end of the pipeline. 
     27 * '''Simple control flow optimisation''', implemented in `CmmContFlowOpt`.  It's called both at the beginning and end of the pipeline. 
    2828   * Branch chain elimination. 
    2929   * Remove unreachable blocks. 
    3030   * Block concatenation.  branch to K; and this is the only use of K.   
    3131 
    32  * AT THIS POINT CONTROL MOVES TO `CmmCps.cpsTop` for the rest of the pipeline 
    33  
    34  * '''More control flow optimisations''' in `CmmCps.cpsTop`. 
     32 * '''More control flow optimisations'''. 
    3533   * Common Block Elimination (like CSE). This essentially implements the Adams optimisation, we believe. 
    3634   * Consider (sometime): block duplication.  branch to K; and K is a short block.  Branch chain elimination is just a special case of this. 
    3735 
    38  * '''Proc-point analysis''' and '''transformation''', implemented in `CmmProcPointZ`.  (Adams version is `CmmProcPoint`.) The transformation part adds a function prologue to the front of each proc-point, following a standard entry convention. 
     36 * '''Proc-point analysis''' and '''transformation''', implemented in `CmmProcPoint`. The transformation part adds a function prologue to the front of each proc-point, following a standard entry convention. 
    3937    * The analysis produces a set of `BlockId` that should become proc-points 
    4038    * The transformation inserts a function prologue at the start of each proc-point, and a function epilogue just before each branch to a proc-point. 
     
    4947 
    5048 * '''Rewrite assignments''' (assignments to local regs, that is, not stores).  
    51    * Convert graph to annotated graph whose nodes are `CmmSpillReload.WithRegUsage`.  Specifically, `CmmAssign` is decorated with a flag `RegUsage` saying whether it is used once or many times. 
     49   * Convert graph to annotated graph whose nodes are `CmmRewriteAssignments.WithRegUsage`.  Specifically, `CmmAssign` is decorated with a flag `RegUsage` saying whether it is used once or many times. 
    5250   * Sink or inline assignments nearer their use points 
    5351 
     
    6765   * Find each safe `MidForeignCall` node, "lowers" it into the suspend/call/resume sequence (see `Note [Foreign calls]` in `CmmNode.hs`.), and build an info table for them. 
    6866   * Convert the `CmmInfo` for each `CmmProc` into a `[CmmStatic]`, using the live variable information computed just before "Figure out stack layout".   
    69  
    70  * AT THIS POINT CONTROL MOVES BACK TO `HscMain.tryNewCodeGen` where a final control-flow optimisation pass takes place. 
    7167 
    7268=== Branches to continuations and the "Adams optimisation" ===