Skip to content
  1. Sep 02, 2005
  2. Mar 10, 2005
    • Chris Lattner's avatar
      Allow the live interval analysis pass to be a bit more aggressive about · 76aa8e07
      Chris Lattner authored
      numbering values in live ranges for physical registers.
      
      The alpha backend currently generates code that looks like this:
      
        vreg = preg
      ...
        preg = vreg
        use preg
      ...
        preg = vreg
        use preg
      
      etc.  Because vreg contains the value of preg coming in, each of the
      copies back into preg contain that initial value as well.
      
      In the case of the Alpha, this allows this testcase:
      
      void "foo"(int %blah) {
              store int 5, int *%MyVar
              store int 12, int* %MyVar2
              ret void
      }
      
      to compile to:
      
      foo:
              ldgp $29, 0($27)
              ldiq $0,5
              stl $0,MyVar
              ldiq $0,12
              stl $0,MyVar2
              ret $31,($26),1
      
      instead of:
      
      foo:
              ldgp $29, 0($27)
              bis $29,$29,$0
              ldiq $1,5
              bis $0,$0,$29
              stl $1,MyVar
              ldiq $1,12
              bis $0,$0,$29
              stl $1,MyVar2
              ret $31,($26),1
      
      This does not seem to have any noticable effect on X86 code.
      
      This fixes PR535.
      
      llvm-svn: 20536
      76aa8e07
  3. Dec 07, 2004
    • Reid Spencer's avatar
      For PR387:\ · 90839368
      Reid Spencer authored
      Make only one print method to avoid overloaded virtual warnings when \
      compiled with -Woverloaded-virtual
      
      llvm-svn: 18589
      90839368
  4. Sep 30, 2004
  5. Sep 08, 2004
  6. Aug 27, 2004
  7. Aug 04, 2004
  8. Jul 24, 2004
  9. Jul 23, 2004
    • Chris Lattner's avatar
      More minor changes: · 1604b02c
      Chris Lattner authored
       * Inline some functions
       * Eliminate some comparisons from the release build
      
      This is good for another .3 on gcc.
      
      llvm-svn: 15144
      1604b02c
    • Chris Lattner's avatar
      Speedup debug builds a bit · 848c7c59
      Chris Lattner authored
      llvm-svn: 15137
      848c7c59
    • Chris Lattner's avatar
      Rename LiveIntervals.(cpp|h) -> LiveIntervalAnalysis.(cpp|h) · 85638332
      Chris Lattner authored
      llvm-svn: 15135
      85638332
    • Chris Lattner's avatar
      Pull the LiveRange and LiveInterval classes out of LiveIntervals.h (which · 78f62e37
      Chris Lattner authored
      will soon be renamed) into their own file.  The new file should not emit
      DEBUG output or have other side effects.  The LiveInterval class also now
      doesn't know whether its working on registers or some other thing.
      
      In the future we will want to use the LiveInterval class and friends to do
      stack packing.  In addition to a code simplification, this will allow us to
      do it more easily.
      
      llvm-svn: 15134
      78f62e37
    • Chris Lattner's avatar
      Improve comments a bit · 53280cd2
      Chris Lattner authored
      Use an explicit LiveRange class to represent ranges instead of an std::pair.
      This is a minor cleanup, but is really intended to make a future patch simpler
      and less invasive.
      
      Alkis, could you please take a look at LiveInterval::liveAt?  I suspect that
      you can add an operator<(unsigned) to LiveRange, allowing us to speed up the
      upper_bound call by quite a bit (this would also apply to other callers of
      upper/lower_bound).  I would do it myself, but I still don't understand that
      crazy liveAt function, despite the comment. :)
      
      Basically I would like to see this:
          LiveRange dummy(index, index+1);
          Ranges::const_iterator r = std::upper_bound(ranges.begin(),
                                                      ranges.end(),
                                                      dummy);
      
      Turn into:
          Ranges::const_iterator r = std::upper_bound(ranges.begin(),
                                                      ranges.end(),
                                                      index);
      
      llvm-svn: 15130
      53280cd2
    • Chris Lattner's avatar
      Force coallescing of live ranges that have a single definition, even if they · b549420c
      Chris Lattner authored
      interfere.  Because these intervals have a single definition, and one of them
      is a copy instruction, they are always safe to merge even if their lifetimes
      interfere.  This slightly reduces the amount of spill code, for example on
      252.eon, from:
      
       12837 spiller               - Number of loads added
        7604 spiller               - Number of stores added
        5842 spiller               - Number of register spills
       18155 liveintervals         - Number of identity moves eliminated after coalescing
      
      to:
      
        12754 spiller               - Number of loads added
         7585 spiller               - Number of stores added
         5803 spiller               - Number of register spills
        18262 liveintervals         - Number of identity moves eliminated after coalescing
      
      The much much bigger win would be to merge intervals with multiple definitions
      (aka phi nodes) but this is not that day.
      
      llvm-svn: 15124
      b549420c
  10. Jul 19, 2004
  11. Jun 21, 2004
  12. May 30, 2004
  13. May 29, 2004
  14. Apr 09, 2004
  15. Mar 01, 2004
  16. Feb 23, 2004
  17. Feb 22, 2004
  18. Feb 20, 2004
    • Alkis Evlogimenos's avatar
      Too many changes in one commit: · 76eca062
      Alkis Evlogimenos authored
      1. LiveIntervals now implement a 4 slot per instruction model. Load,
         Use, Def and a Store slot. This is required in order to correctly
         represent caller saved register clobbering on function calls,
         register reuse in the same instruction (def resues last use) and
         also spill code added later by the allocator. The previous
         representation (2 slots per instruction) was insufficient and as a
         result was causing subtle bugs.
      
      2. Fixes in spill code generation. This was the major cause of
         failures in the test suite.
      
      3. Linear scan now has core support for folding memory operands. This
         is untested and not enabled (the live interval update function does
         not attempt to fold loads/stores in instructions).
      
      4. Lots of improvements in the debugging output of both live intervals
         and linear scan. Give it a try... it is beautiful :-)
      
      In summary the above fixes all the issues with the recent reserved
      register elimination changes and get the allocator very close to the
      next big step: folding memory operands.
      
      llvm-svn: 11654
      76eca062
  19. Feb 19, 2004
  20. Feb 17, 2004
  21. Feb 15, 2004
  22. Jan 31, 2004
  23. Jan 23, 2004
  24. Jan 16, 2004
  25. Jan 13, 2004
  26. Dec 28, 2003
    • Alkis Evlogimenos's avatar
      Add coalescing to register allocator. A hint is added to each interval · 43b587d9
      Alkis Evlogimenos authored
      which denotes the register we would like to be assigned to (virtual or
      physical). In register allocation, if this hint exists and we can map
      it to a physical register (it is either a physical register or it is a
      virtual register that already got assigned to a physical one) we use
      that register if it is available instead of a random one in the free
      pool.
      
      llvm-svn: 10634
      43b587d9
Loading