Skip to content
  1. May 23, 2013
  2. Feb 21, 2013
  3. Feb 20, 2013
    • Jakob Stoklund Olesen's avatar
      Use LiveRangeUpdater instead of mergeIntervalRanges. · 623d8329
      Jakob Stoklund Olesen authored
      Performance is the same, but LiveRangeUpdater has a more flexible
      interface.
      
      llvm-svn: 175645
      623d8329
    • Jakob Stoklund Olesen's avatar
      Add a LiveRangeUpdater class. · 521c708e
      Jakob Stoklund Olesen authored
      Adding new segments to large LiveIntervals can be expensive because the
      LiveRange objects after the insertion point may need to be moved left or
      right. This can cause quadratic behavior when adding a large number of
      segments to a live range.
      
      The LiveRangeUpdater class allows the LIveInterval to be in a temporary
      invalid state while segments are being added. It maintains an internal
      gap in the LiveInterval when it is shrinking, and it has a spill area
      for new segments when the LiveInterval is growing.
      
      The behavior is similar to the existing mergeIntervalRanges() function,
      except it allocates less memory for the spill area, and the algorithm is
      turned inside out so the loop is driven by the clients.
      
      llvm-svn: 175644
      521c708e
    • David Blaikie's avatar
      Fully qualify llvm::next to avoid ambiguity when building as C++11. · 9db062eb
      David Blaikie authored
      llvm-svn: 175608
      9db062eb
  4. Dec 03, 2012
    • Chandler Carruth's avatar
      Use the new script to sort the includes of every file under lib. · ed0881b2
      Chandler Carruth authored
      Sooooo many of these had incorrect or strange main module includes.
      I have manually inspected all of these, and fixed the main module
      include to be the nearest plausible thing I could find. If you own or
      care about any of these source files, I encourage you to take some time
      and check that these edits were sensible. I can't have broken anything
      (I strictly added headers, and reordered them, never removed), but they
      may not be the headers you'd really like to identify as containing the
      API being implemented.
      
      Many forward declarations and missing includes were added to a header
      files to allow them to parse cleanly when included first. The main
      module rule does in fact have its merits. =]
      
      llvm-svn: 169131
      ed0881b2
  5. Nov 19, 2012
  6. Sep 27, 2012
  7. Sep 12, 2012
  8. Sep 06, 2012
    • Manman Ren's avatar
      Release build: guard dump functions with "ifndef NDEBUG" · 742534c4
      Manman Ren authored
      No functional change.
      
      llvm-svn: 163339
      742534c4
    • Jakob Stoklund Olesen's avatar
      Allow overlaps between virtreg and physreg live ranges. · 866908c4
      Jakob Stoklund Olesen authored
      The RegisterCoalescer understands overlapping live ranges where one
      register is defined as a copy of the other. With this change, register
      allocators using LiveRegMatrix can do the same, at least for copies
      between physical and virtual registers.
      
      When a physreg is defined by a copy from a virtreg, allow those live
      ranges to overlap:
      
        %CL<def> = COPY %vreg11:sub_8bit; GR32_ABCD:%vreg11
        %vreg13<def,tied1> = SAR32rCL %vreg13<tied0>, %CL<imp-use,kill>
      
      We can assign %vreg11 to %ECX, overlapping the live range of %CL.
      
      llvm-svn: 163336
      866908c4
  9. 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
  10. 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
  11. Jul 11, 2012
  12. 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
  13. Jul 05, 2012
  14. 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
  15. Jun 05, 2012
  16. 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
  17. Apr 28, 2012
  18. 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
  19. Feb 02, 2012
  20. Nov 14, 2011
  21. 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
  22. 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
  23. Sep 13, 2011
  24. Mar 20, 2011
  25. Mar 17, 2011
  26. 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
  27. Mar 11, 2011
  28. Mar 08, 2011
  29. Mar 03, 2011
Loading