Changes between Version 1 and Version 2 of Commentary/Compiler/NewCodeGenStupidity


Ignore:
Timestamp:
Mar 22, 2011 3:25:44 PM (4 years ago)
Author:
ezyang
Comment:

Up and Down, Up and Down, I will lead you Up and Down

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/NewCodeGenStupidity

    v1 v2  
    6969
    7070We see `Hp - 4` being allocated to a temp, and then consequently being spilled to the stack even though `newCAF` definitely will not change `Hp`, so we could have floated the expression down.
     71
     72== Up and Down ==
     73
     74A frequent pattern is the stack pointer being bumped up and then back down again, for no particular reason.
     75
     76{{{
     77         Sp = Sp + 4;
     78         Sp = Sp - 4;
     79         jump block_c7xh_entry ();
     80}}}
     81
     82This is mentioned at the very top of `cmm-notes`.