Changes between Version 13 and Version 14 of Commentary/Compiler/NewCodeGenPipeline


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

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/NewCodeGenPipeline

    v13 v14  
    1919
    2020Code generation now has three stages:
    21   * Convert STG to Cmm, with implicit stack implicit, and native Cmm calls.
    22   * Optimise the Cmm, and CPS-convert it to have an explicit stack, and no native calls.
    23   * Feed the CPS-converted Cmm to the existing, unmodified native code generators.
     21  1. Convert STG to Cmm, with implicit stack implicit, and native Cmm calls.
     22  2. Optimise the Cmm, and CPS-convert it to have an explicit stack, and no native calls.
     23  3. Feed the CPS-converted Cmm to the existing, unmodified native code generators.
     24
     25The first two steps are described in more detail here:
    2426
    2527 * '''Code generator''' converts STG to `CmmGraph`.  Implemented in `StgCmm*` modules (in directory `codeGen`).
    26    * Parameter passing and stack adjustments are made explicit using the [wiki:Commentary/Compiler/StackAreas ''Stack Area'' abstraction.]
    27    * That includes a store of the return address.
     28   * Parameter passing is made explicit.  Parameters are passed in virtual registers R1, R2 etc. Overflow parameters are passed on the stack using explicit memory stores, to locations described abstractly using the [wiki:Commentary/Compiler/StackAreas ''Stack Area'' abstraction.].   
     29   * That includes a store of the return address, which is stored explicitly on the stack in the same way as overflow parameters.
    2830   * No `CopyIn`, `CopyOut` nodes any more; instead "smart constructors" lower the calling convention to loads/stores/register transfers, using stack area abstraction.
    2931   * But we still have `LastCall`, `LastReturn`, `LastBranch`, `LastJump` as `Last` nodes.