Changes between Version 8 and Version 9 of Commentary/Compiler/NewCodeGenPipeline


Ignore:
Timestamp:
Jul 29, 2008 1:02:31 PM (7 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/NewCodeGenPipeline

    v8 v9  
    2020    * 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. 
    2121 
    22  * '''Add spill/reload''', implemented in `CmmSpillReload`, to spill live C-- variables before a call and reload them afterwards.  The middle node of the result is `Middle` (from `ZipCfgCmm` extended with `Spill` and `Reload` constructors.   
    23  Invariant: (something like) all variables in a block are gotten from `CopyIn` or `Reload`.  
     22 * '''Add spill/reload''', implemented in `CmmSpillReload`, to spill live C-- variables before a call and reload them afterwards.  The spill and reload instructions are simply memory stores and loads respectively, using symbolic stack offsets (see [wiki:Commentary/Compiler/StackAreas#Layingoutthestack stack layout]).  For example, a spill of variable 'x' would look like `Ptr32[SS(x)] = x`. 
    2423 
    2524 * '''Lay out the stack''' 
    2625   * A `SlotId` is the offset of a stack slot from the old end (high address) of the frame.  It doesn't vary as the physical stack pointer moves. 
    27    * A particular variable has one and only one `SlotId`.   
     26   * A particular variable 'x' has one and only one `SlotId`, written `SS(x)`. 
     27   * A proc-point label K has a `SlotId`, written `SS(K)`, from which its (perhaps multiple) fields can be accessed. 
    2828   * The stack layout pass produces a mapping of: ''(Area -> slotid)''. For more detail, see [wiki:Commentary/Compiler/StackAreas#Layingoutthestack the description of stack layout.] 
    2929   * Walk over the graph, replacing references to stack areas with offsets from the stack pointer.