Changes between Version 34 and Version 35 of Commentary/Compiler/StackAreas


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

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/StackAreas

    v34 v35  
    9696=== The greedy algorithm === 
    9797 
    98 One way to assign stack slots is to traverse the flow graph in a reverse post-order depth-first search, assigning a stack location to each stack slot the first time we encounter the slot. The assignment is reused for each subsequent reference to the stack slot. 
     98One way to assign stack slots is to traverse the flow graph in a reverse post-order depth-first search, allocating a stack location to each stack slot the first time we encounter the slot. (Note: When we encounter a parameter-passing area for the first time, we allocate stack locations for the whole area.) The allocation is then reused for every reference to the stack slot. 
    9999 
    100100The algorithm keeps two maps: