Skip to content
  • Evan Cheng's avatar
    Teach spiller to unfold instructions which modref spill slot when a scratch · b96a1082
    Evan Cheng authored
    register is available and when it's profitable.
    
    e.g.
         xorq  %r12<kill>, %r13
         addq  %rax, -184(%rbp)
         addq  %r13, -184(%rbp)
    ==>
         xorq  %r12<kill>, %r13
         movq  -184(%rbp), %r12
         addq  %rax, %r12
         addq  %r13, %r12
         movq  %r12, -184(%rbp)
    
    Two more instructions, but fewer memory accesses. It can also open up
    opportunities for more optimizations.
    
    llvm-svn: 69341
    b96a1082
Loading