Changes between Version 20 and Version 21 of Commentary/Compiler/StackAreas


Ignore:
Timestamp:
Jun 6, 2008 3:34:06 PM (7 years ago)
Author:
dias
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/StackAreas

    v20 v21  
    44The stack-layout phase decides where to spill variables. The important goals are to avoid memory traffic and to minimize the size of the stack frame. Both of these goals are accomplished by reusing stack slots. 
    55 
    6 === The old approach === 
     6=== Representing Stack Slots === 
     7 
     8==== The old approach ==== 
    79 
    810 
     
    2628Every stage of the back end must cope with the !CopyIn and !CopyOut pseudoinstructions. 
    2729 
    28 === The new approach === 
     30==== The new approach ==== 
    2931 
    3032A better approach is to introduce a unique name for each stack slot, then treat the name as the addressing expression for the slot. At the end of the pipeline, we choose a stack layout, then replace each stack slot with its offset from the stack pointer. The benefit is that we break the phase-ordering problem: any phase of the compiler can name a stack slot.