Changes between Version 33 and Version 34 of Commentary/Compiler/NewCodeGenPipeline


Ignore:
Timestamp:
Feb 10, 2011 2:00:12 PM (5 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/NewCodeGenPipeline

    v33 v34  
    3636
    3737 * '''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`.  There are three stages:
    38    * Insert spills at definitions and reloads at return points
    39    * Duplicate reloads just before uses
     38   * `dualLivenessWithInsertion` does two things:
     39     * Spills at the definition of any variable that is subequently live across a call (uses a backward analysis)
     40     * Adds a reload at each return (or proc) point
     41   * `insertLateReloads`: Duplicate reloads just before uses, if every path to the use defines the variable by a reload (uses a forward analysis)
    4042   * Remove redundant reloads
    4143