Skip to content
  1. Apr 20, 2009
    • Evan Cheng's avatar
      - Remove an arbitrary spill weight tweak that should not have been there. · 5dd2e29b
      Evan Cheng authored
      - Find more reloads from SS.
      
      llvm-svn: 69606
      5dd2e29b
    • Evan Cheng's avatar
      Added a linearscan register allocation optimization. When the register... · d67efaa8
      Evan Cheng authored
      Added a linearscan register allocation optimization. When the register allocator spill an interval with multiple uses in the same basic block, it creates a different virtual register for each of the reloads. e.g.
      
      	%reg1498<def> = MOV32rm %reg1024, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0]
              %reg1506<def> = MOV32rm %reg1024, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0]
              %reg1486<def> = MOV32rr %reg1506
              %reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead>
              %reg1510<def> = MOV32rm %reg1024, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0]
      
      =>
      
              %reg1498<def> = MOV32rm %reg2036, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0]
              %reg1506<def> = MOV32rm %reg2037, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0]
              %reg1486<def> = MOV32rr %reg1506
              %reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead>
              %reg1510<def> = MOV32rm %reg2038, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0]
      
      From linearscan's point of view, each of reg2036, 2037, and 2038 are separate registers, each is "killed" after a single use. The reloaded register is available and it's often clobbered right away. e.g. In thise case reg1498 is allocated EAX while reg2036 is allocated RAX. This means we end up with multiple reloads from the same stack slot in the same basic block.
      
      Now linearscan recognize there are other reloads from same SS in the same BB. So it'll "downgrade" RAX (and its aliases) after reg2036 is allocated until the next reload (reg2037) is done. This greatly increase the likihood reloads from SS are reused.
      
      This speeds up sha1 from OpenSSL by 5.8%. It is also an across the board win for SPEC2000 and 2006.
      
      llvm-svn: 69585
      d67efaa8
  2. Mar 23, 2009
  3. Mar 13, 2009
  4. Mar 11, 2009
  5. Jan 20, 2009
  6. Jan 05, 2009
  7. Oct 29, 2008
  8. Oct 23, 2008
    • Evan Cheng's avatar
      Committing a good chunk of the pre-register allocation live interval splitting... · d0d0317b
      Evan Cheng authored
      Committing a good chunk of the pre-register allocation live interval splitting pass. It's handling simple cases and appear to do good things. Next: avoid splitting an interval multiple times; renumber registers when possible; record stack slot live intervals for coloring; rematerialize defs when possible.
      
      llvm-svn: 58044
      d0d0317b
  9. Oct 14, 2008
  10. Oct 07, 2008
  11. Sep 30, 2008
  12. Sep 24, 2008
  13. Sep 20, 2008
  14. Sep 19, 2008
  15. Sep 17, 2008
    • Dale Johannesen's avatar
      Add a bit to mark operands of asm's that conflict · f8610ebe
      Dale Johannesen authored
      with an earlyclobber operand elsewhere.  Propagate
      this bit and the earlyclobber bit through SDISel.
      Change linear-scan RA not to allocate regs in a way 
      that conflicts with an earlyclobber.  See also comments.
      
      llvm-svn: 56290
      f8610ebe
  16. Sep 09, 2008
  17. Sep 04, 2008
  18. Aug 15, 2008
  19. Aug 14, 2008
  20. Aug 13, 2008
  21. Jul 23, 2008
  22. Jun 24, 2008
  23. Jun 20, 2008
    • Evan Cheng's avatar
      Enhanced heuristic to determine the *best* register to spill. Instead of... · efc67e78
      Evan Cheng authored
      Enhanced heuristic to determine the *best* register to spill. Instead of picking the register with the lowest spill weight. Consider (up to) 2 additional registers with spill weights that are close to the lowest spill weight. The one with fewest defs and uses that conflicts with the current interval (weighted by loop depth) is the spill candidate.
      
      This is not always a win, but there are much more wins than loses and wins tend to be more noticeable.
      
      llvm-svn: 52554
      efc67e78
  24. Jun 06, 2008
  25. Jun 04, 2008
  26. Apr 11, 2008
  27. Apr 03, 2008
  28. Mar 25, 2008
  29. Mar 13, 2008
  30. Mar 11, 2008
    • Evan Cheng's avatar
      When the register allocator runs out of registers, spill a physical register... · e88a625e
      Evan Cheng authored
      When the register allocator runs out of registers, spill a physical register around the def's and use's of the interval being allocated to make it possible for the interval to target a register and spill it right away and restore a register for uses. This likely generates terrible code but is before than aborting.
      
      llvm-svn: 48218
      e88a625e
Loading