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


Ignore:
Timestamp:
May 25, 2007 6:01:30 PM (7 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/CPS

    v13 v14  
    144144}}} 
    145145 
    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. 
     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.  (The global saves part of a CmmProc is dead b/c of this.) 
    147147{{{ 
    148148foo () { 
     
    177177}}} 
    178178 
     179 * Simple calls 
     180   * Before 
     181{{{ 
     182f(..., z, ...) { 
     183  ... 
     184  r = f(x, y); 
     185  ... 
     186  ... = z; 
     187  ... = r; 
     188} 
     189}}} 
     190   * Output of CPS 
     191{{{ 
     192f() { 
     193  z=R1 
     194  ... 
     195  ... = z; 
     196  ... 
     197  R1 = x; 
     198  R2 = y; 
     199  call f; 
     200  r = R1 
     201  ... 
     202  ... = z; 
     203  ... = r; 
     204} 
     205}}} 
     206   * Optimization by the NCG 
     207{{{ 
     208f() { 
     209  ... 
     210  ... = R1; 
     211  ... 
     212  z = R1; 
     213  R1 = x; 
     214  R2 = y; 
     215  call f; 
     216  ... 
     217  ... = z; 
     218  ... = R1; 
     219} 
     220}}}