Skip to content
  1. Sep 15, 2011
    • Jakob Stoklund Olesen's avatar
      Trace through sibling PHIs in bulk. · 07b3503f
      Jakob Stoklund Olesen authored
      When traceSiblingValue() encounters a PHI-def value created by live
      range splitting, don't look at all the predecessor blocks.  That can be
      very expensive in a complicated CFG.
      
      Instead, consider that all the non-PHI defs jointly dominate all the
      PHI-defs.  Tracing directly to all the non-PHI defs is much faster that
      zipping around in the CFG when there are many PHIs with many
      predecessors.
      
      This significantly improves compile time for indirectbr interpreters.
      
      llvm-svn: 139797
      07b3503f
  2. Sep 09, 2011
    • Jakob Stoklund Olesen's avatar
      Reapply r139247: Cache intermediate results during traceSiblingValue. · 278bf025
      Jakob Stoklund Olesen authored
      In some cases such as interpreters using indirectbr, the CFG can be very
      complicated, and live range splitting may be forced to insert a large
      number of phi-defs.  When that happens, traceSiblingValue can spend a
      lot of time zipping around in the CFG looking for defs and reloads.
      
      This patch causes more information to be cached in SibValues, and the
      cached values are used to terminate searches early.  This speeds up
      spilling by 20x in one interpreter test case.  For more typical code,
      this is just a 10% speedup of spilling.
      
      The previous version had bugs that caused miscompilations. They have
      been fixed.
      
      llvm-svn: 139378
      278bf025
  3. Sep 07, 2011
    • Jakob Stoklund Olesen's avatar
      Revert r139247 "Cache intermediate results during traceSiblingValue." · 946e0a46
      Jakob Stoklund Olesen authored
      It broke the self host and clang-x86_64-darwin10-RA.
      
      llvm-svn: 139259
      946e0a46
    • Jakob Stoklund Olesen's avatar
      Cache intermediate results during traceSiblingValue. · b77d5c14
      Jakob Stoklund Olesen authored
      In some cases such as interpreters using indirectbr, the CFG can be very
      complicated, and live range splitting may be forced to insert a large
      number of phi-defs.  When that happens, traceSiblingValue can spend a
      lot of time zipping around in the CFG looking for defs and reloads.
      
      This patch causes more information to be cached in SibValues, and the
      cached values are used to terminate searches early.  This speeds up
      spilling by 20x in one interpreter test case.  For more typical code,
      this is just a 10% speedup of spilling.
      
      llvm-svn: 139247
      b77d5c14
  4. Sep 01, 2011
  5. Aug 30, 2011
  6. Jul 18, 2011
    • Jakob Stoklund Olesen's avatar
      Fix PR10387. · c0dd3da9
      Jakob Stoklund Olesen authored
      When trying to rematerialize a value before an instruction that has an
      early-clobber redefine of the virtual register, make sure to look up the
      correct value number.
      
      Early-clobber defs are moved one slot back, so getBaseIndex is needed to
      find the used value number.
      
      Bugpoint was unable to reduce the test case for this, see PR10388.
      
      llvm-svn: 135378
      c0dd3da9
  7. Jul 09, 2011
    • Jakob Stoklund Olesen's avatar
      Oops, didn't mean to commit that. · 780db902
      Jakob Stoklund Olesen authored
      Spills should be hoisted out of loops, but we don't want to hoist them
      to dominating blocks at the same loop depth. That could cause the spills
      to be executed more often.
      
      llvm-svn: 134782
      780db902
    • Jakob Stoklund Olesen's avatar
      Hoist spills within a basic block. · bf6afec3
      Jakob Stoklund Olesen authored
      Try to move spills as early as possible in their basic block. This can
      help eliminate interferences by shortening the live range being
      spilled.
      
      This fixes PR10221.
      
      llvm-svn: 134776
      bf6afec3
  8. Jul 05, 2011
    • Jakob Stoklund Olesen's avatar
      Fix PR10277. · bbad3bce
      Jakob Stoklund Olesen authored
      Remat during spilling triggers dead code elimination. If a phi-def
      becomes unused, that may also cause live ranges to split into separate
      connected components.
      
      This type of splitting is different from normal live range splitting. In
      particular, there may not be a common original interval.
      
      When the split range is its own original, make sure that the new
      siblings are also their own originals. The range being split cannot be
      used as an original since it doesn't cover the new siblings.
      
      llvm-svn: 134413
      bbad3bce
  9. Jun 30, 2011
  10. May 11, 2011
  11. May 05, 2011
  12. Apr 30, 2011
  13. Apr 21, 2011
  14. Apr 18, 2011
  15. Mar 31, 2011
    • Jakob Stoklund Olesen's avatar
      Pick a conservative register class when creating a small live range for remat. · ae044c06
      Jakob Stoklund Olesen authored
      The rematerialized instruction may require a more constrained register class
      than the register being spilled. In the test case, the spilled register has been
      inflated to the DPR register class, but we are rematerializing a load of the
      ssub_0 sub-register which only exists for DPR_VFP2 registers.
      
      The register class is reinflated after spilling, so the conservative choice is
      only temporary.
      
      llvm-svn: 128610
      ae044c06
  16. Mar 29, 2011
  17. Mar 26, 2011
  18. Mar 20, 2011
  19. Mar 18, 2011
    • Jakob Stoklund Olesen's avatar
      Hoist spills when the same value is known to be in less loopy sibling registers. · 27320cb8
      Jakob Stoklund Olesen authored
      Stack slot real estate is virtually free compared to registers, so it is
      advantageous to spill earlier even though the same value is now kept in both a
      register and a stack slot.
      
      Also eliminate redundant spills by extending the stack slot live range
      underneath reloaded registers.
      
      This can trigger a dead code elimination, removing copies and even reloads that
      were only feeding spills.
      
      llvm-svn: 127868
      27320cb8
  20. Mar 17, 2011
  21. Mar 15, 2011
    • Jakob Stoklund Olesen's avatar
      Trace back through sibling copies to hoist spills and find rematerializable defs. · a0d5ec10
      Jakob Stoklund Olesen authored
      After live range splitting, an original value may be available in multiple
      registers. Tracing back through the registers containing the same value, find
      the best place to insert a spill, determine if the value has already been
      spilled, or discover a reaching def that may be rematerialized.
      
      This is only the analysis part. The information is not used for anything yet.
      
      llvm-svn: 127698
      a0d5ec10
  22. Mar 14, 2011
  23. Mar 13, 2011
  24. Mar 12, 2011
  25. Mar 10, 2011
  26. Mar 09, 2011
  27. Mar 07, 2011
  28. Feb 24, 2011
  29. Feb 23, 2011
  30. Feb 09, 2011
  31. Feb 08, 2011
Loading