Skip to content
  1. Aug 03, 2012
    • Jakob Stoklund Olesen's avatar
      Completely eliminate VNInfo flags. · daae19f7
      Jakob Stoklund Olesen authored
      The 'unused' state of a value number can be represented as an invalid
      def SlotIndex. This also exposed code that shouldn't have been looking
      at unused value VNInfos.
      
      llvm-svn: 161258
      daae19f7
    • Jakob Stoklund Olesen's avatar
      Eliminate the VNInfo::hasPHIKill() flag. · 9f565e19
      Jakob Stoklund Olesen authored
      The only real user of the flag was removeCopyByCommutingDef(), and it
      has been switched to LiveIntervals::hasPHIKill().
      
      All the code changed by this patch was only concerned with computing and
      propagating the flag.
      
      llvm-svn: 161255
      9f565e19
  2. Jul 25, 2012
    • Jakob Stoklund Olesen's avatar
      Preserve 2-addr constraints in ConnectedVNInfoEqClasses. · cef9a618
      Jakob Stoklund Olesen authored
      When a live range splits into multiple connected components, we would
      arbitrarily assign <undef> uses to component 0. This is wrong when the
      use is tied to a def that gets assigned to a different component:
      
        %vreg69<def> = ADD8ri %vreg68<undef>, 1
      
      The use and def must get the same virtual register.
      
      Fix this by assigning <undef> uses to the same component as the value
      defined by the instruction, if any:
      
        %vreg69<def> = ADD8ri %vreg69<undef>, 1
      
      This fixes PR13402. The PR has a test case which I am not including
      because it is unlikely to keep exposing this behavior in the future.
      
      llvm-svn: 160739
      cef9a618
  3. Jul 11, 2012
  4. Jul 10, 2012
    • Chandler Carruth's avatar
      Fix a bug where I didn't test for an empty range before inspecting the · 77d94001
      Chandler Carruth authored
      back of it.
      
      I don't have anything even remotely close to a test case for this. It
      only broke two build bots, both of them doing bootstrap builds, one of
      them a dragonegg bootstrap. It doesn't break for me when I bootstrap
      either. It doesn't reproduce every time or on many machines during the
      bootstrap. Many thanks to Duncan Sands who got the exact command (and
      stage of the bootstrap) which failed on the dragonegg bootstrap and
      managed to get it to trigger under valgrind with debug symbols. The fix
      was then found by inspection.
      
      llvm-svn: 159993
      77d94001
    • Chandler Carruth's avatar
      Add an efficient merge operation to LiveInterval and use it to avoid · e18614dd
      Chandler Carruth authored
      quadratic behavior when performing pathological merges. Fixes the core
      element of PR12652.
      
      There is only one user of addRangeFrom left: join. I'm hoping to
      refactor further in a future patch and have join use this merge
      operation as well.
      
      llvm-svn: 159982
      e18614dd
    • Chandler Carruth's avatar
      Teach LiveIntervals how to verify themselves and start using it in some · ac766b9b
      Chandler Carruth authored
      of the trick merge routines. This adds a layer of testing that was
      necessary when implementing more efficient (and complex) merge logic for
      this datastructure.
      
      No functionality changed here.
      
      llvm-svn: 159981
      ac766b9b
  5. Jul 05, 2012
  6. Jun 06, 2012
    • Jakob Stoklund Olesen's avatar
      Simplify LiveInterval::print(). · f3f7d6f6
      Jakob Stoklund Olesen authored
      Don't print out the register number and spill weight, making the TRI
      argument unnecessary.
      
      This allows callers to interpret the reg field. It can currently be a
      virtual register, a physical register, a spill slot, or a register unit.
      
      llvm-svn: 158031
      f3f7d6f6
  7. Jun 05, 2012
  8. May 19, 2012
    • Jakob Stoklund Olesen's avatar
      Run proper recursive dead code elimination during coalescing. · 82d77e81
      Jakob Stoklund Olesen authored
      Dead copies cause problems because they are trivial to coalesce, but
      removing them gived the live range a dangling end point. This patch
      enables full dead code elimination which trims live ranges to their uses
      so end points don't dangle.
      
      DCE may erase multiple instructions. Put the pointers in an ErasedInstrs
      set so we never risk visiting erased instructions in the work list.
      
      There isn't supposed to be any dead copies entering RegisterCoalescer,
      but they do slip by as evidenced by test/CodeGen/X86/coalescer-dce.ll.
      
      llvm-svn: 157101
      82d77e81
  9. Apr 28, 2012
  10. Feb 04, 2012
    • Jakob Stoklund Olesen's avatar
      Drop the REDEF_BY_EC VNInfo flag. · abb26bae
      Jakob Stoklund Olesen authored
      A live range that has an early clobber tied redef now looks like a
      normal tied redef, except the early clobber def uses the early clobber
      slot.
      
      This is enough to handle any strange interference problems.
      
      llvm-svn: 149769
      abb26bae
  11. Feb 02, 2012
  12. Nov 14, 2011
  13. Nov 13, 2011
    • Jakob Stoklund Olesen's avatar
      Rename SlotIndexes to match how they are used. · 90b5e565
      Jakob Stoklund Olesen authored
      The old naming scheme (load/use/def/store) can be traced back to an old
      linear scan article, but the names don't match how slots are actually
      used.
      
      The load and store slots are not needed after the deferred spill code
      insertion framework was deleted.
      
      The use and def slots don't make any sense because we are using
      half-open intervals as is customary in C code, but the names suggest
      closed intervals.  In reality, these slots were used to distinguish
      early-clobber defs from normal defs.
      
      The new naming scheme also has 4 slots, but the names match how the
      slots are really used.  This is a purely mechanical renaming, but some
      of the code makes a lot more sense now.
      
      llvm-svn: 144503
      90b5e565
  14. Sep 15, 2011
    • Jakob Stoklund Olesen's avatar
      Leave hasPHIKill flags alone in LiveInterval::RenumberValues. · e7ca8ecd
      Jakob Stoklund Olesen authored
      It is conservatively correct to keep the hasPHIKill flags, even after
      deleting PHI-defs.
      
      The calculation can be very expensive after taildup has created a
      quadratic number of indirectbr edges in the CFG, and the hasPHIKill flag
      isn't used for anything after RenumberValues().
      
      llvm-svn: 139780
      e7ca8ecd
  15. Sep 13, 2011
  16. Mar 20, 2011
  17. Mar 17, 2011
  18. Mar 12, 2011
    • Jakob Stoklund Olesen's avatar
      That's it, I am declaring this a failure of the C++03 STL. · dae1dc1f
      Jakob Stoklund Olesen authored
      There are too many compatibility problems with using mixed types in
      std::upper_bound, and I don't want to spend 110 lines of boilerplate setting up
      a call to a 10-line function. Binary search is not /that/ hard to implement
      correctly.
      
      I tried terminating the binary search with a linear search, but that actually
      made the algorithm slower against my expectation. Most live intervals have less
      than 4 segments. The early test against endIndex() does pay, and this version is
      25% faster than plain std::upper_bound().
      
      llvm-svn: 127522
      dae1dc1f
  19. Mar 11, 2011
  20. Mar 08, 2011
  21. Mar 03, 2011
  22. Mar 02, 2011
  23. Jan 19, 2011
    • Jakob Stoklund Olesen's avatar
      Implement RAGreedy::splitAroundRegion and remove loop splitting. · 9fb04015
      Jakob Stoklund Olesen authored
      Region splitting includes loop splitting as a subset, and it is more generic.
      The splitting heuristics for variables that are live in more than one block are
      now:
      
      1. Try to create a region that covers multiple basic blocks.
      2. Try to create a new live range for each block with multiple uses.
      3. Spill.
      
      Steps 2 and 3 are similar to what the standard spiller is doing.
      
      llvm-svn: 123853
      9fb04015
  24. Jan 09, 2011
  25. Dec 21, 2010
  26. Dec 19, 2010
  27. Oct 29, 2010
  28. Oct 09, 2010
  29. Oct 08, 2010
  30. Oct 05, 2010
Loading