Changes between Version 12 and Version 13 of Commentary/Compiler/CPS


Ignore:
Timestamp:
May 25, 2007 11:13:44 AM (7 years ago)
Author:
guest
Comment:

Added note about NCG aliasing analysis

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/CPS

    v12 v13  
    143143} 
    144144}}} 
     145 
     146 * We need the NCG to do aliasing analysis.  At present the CPS pass will generate the following, and will assume that the NCG can figure out when the loads and stores can be eliminated. 
     147{{{ 
     148foo () { 
     149  // Parameters in regs 
     150  a = R1; 
     151  b = R2; 
     152  // Parameters on stack 
     153  c = [Sp-8]; 
     154  d = [Sp-4]; 
     155  // Saved live variables 
     156  e = [Sp+4]; 
     157  f = [Sp+8]; 
     158 
     159  /* 
     160  ... 
     161  Misc code that might mutate variables 
     162  or branch or loop or any other evil thing 
     163  ... 
     164  */ 
     165 
     166  // A tail call (there could be multiple blocks that have this) 
     167  a = R1; 
     168  b = R2; 
     169  // Parameters on stack 
     170  c = [Sp-8]; 
     171  d = [Sp-4]; 
     172  // Saved live variables 
     173  e = [Sp+4]; 
     174  f = [Sp+8]; 
     175   
     176} 
     177}}} 
     178