Skip to content
Snippets Groups Projects
  • Chris Lattner's avatar
    Physregs may hold multiple stack slot values at the same time. Keep track · b7f24de4
    Chris Lattner authored
    of this, and use it to our advantage (bwahahah).  This allows us to eliminate another
    60 instructions from smg2000 on PPC (probably significantly more on X86).  A common
    old-new diff looks like this:
    
            stw r2, 3304(r1)
    -       lwz r2, 3192(r1)
            stw r2, 3300(r1)
    -       lwz r2, 3192(r1)
            stw r2, 3296(r1)
    -       lwz r2, 3192(r1)
            stw r2, 3200(r1)
    -       lwz r2, 3192(r1)
            stw r2, 3196(r1)
    -       lwz r2, 3192(r1)
    +       or r2, r2, r2
            stw r2, 3188(r1)
    
    and
    
    -       lwz r31, 604(r1)
    -       lwz r13, 604(r1)
    -       lwz r14, 604(r1)
    -       lwz r15, 604(r1)
    -       lwz r16, 604(r1)
    -       lwz r30, 604(r1)
    +       or r31, r30, r30
    +       or r13, r30, r30
    +       or r14, r30, r30
    +       or r15, r30, r30
    +       or r16, r30, r30
    +       or r30, r30, r30
    
    Removal of the R = R copies is coming next...
    
    llvm-svn: 25919
    b7f24de4