Skip to content
  1. Jun 17, 2013
    • Benjamin Kramer's avatar
      Switch spill weights from a basic loop depth estimation to BlockFrequencyInfo. · e2a1d89e
      Benjamin Kramer authored
      The main advantages here are way better heuristics, taking into account not
      just loop depth but also __builtin_expect and other static heuristics and will
      eventually learn how to use profile info. Most of the work in this patch is
      pushing the MachineBlockFrequencyInfo analysis into the right places.
      
      This is good for a 5% speedup on zlib's deflate (x86_64), there were some very
      unfortunate spilling decisions in its hottest loop in longest_match(). Other
      benchmarks I tried were mostly neutral.
      
      This changes register allocation in subtle ways, update the tests for it.
      2012-02-20-MachineCPBug.ll was deleted as it's very fragile and the instruction
      it looked for was gone already (but the FileCheck pattern picked up unrelated
      stuff).
      
      llvm-svn: 184105
      e2a1d89e
  2. Apr 06, 2013
  3. Oct 16, 2012
  4. Aug 22, 2012
  5. Jun 20, 2012
  6. Jun 05, 2012
    • Jakob Stoklund Olesen's avatar
      Stop using LiveIntervals::isReMaterializable(). · 9e27e262
      Jakob Stoklund Olesen authored
      It is an old function that does a lot more than required by
      CalcSpillWeights, which was the only remaining caller.
      
      The isRematerializable() function never actually sets the isLoad
      argument, so don't try to compute that.
      
      llvm-svn: 157973
      9e27e262
  7. Aug 09, 2011
  8. Jul 01, 2011
    • Jakob Stoklund Olesen's avatar
      Don't inflate register classes used by inline asm. · 39af582c
      Jakob Stoklund Olesen authored
      The constraints are represented by the register class of the original
      virtual register created for the inline asm. If the register class were
      included in the operand descriptor, we might be able to do this.
      
      For now, just give up on regclass inflation when inline asm is involved.
      
      No test case, this bug hasn't happened yet.
      
      llvm-svn: 134226
      39af582c
  9. Jun 27, 2011
  10. May 17, 2011
    • Jakob Stoklund Olesen's avatar
      Teach LiveInterval::isZeroLength about null SlotIndexes. · 4edf17d9
      Jakob Stoklund Olesen authored
      When instructions are deleted, they leave tombstone SlotIndex entries.
      The isZeroLength method should ignore these null indexes.
      
      This causes RABasic to sometimes spill a callee-saved register in the
      abi-isel.ll test, so don't run that test with -regalloc=basic.  Prioritizing
      register allocation according to spill weight can cause more registers to be
      used.
      
      llvm-svn: 131436
      4edf17d9
  11. Apr 26, 2011
  12. Mar 29, 2011
  13. Mar 10, 2011
  14. Feb 15, 2011
    • Jakob Stoklund Olesen's avatar
      Move more fragments of spill weight calculation into CalcSpillWeights.h · 1dd377d8
      Jakob Stoklund Olesen authored
      Simplify the spill weight calculation a bit by bypassing
      getApproximateInstructionCount() and using LiveInterval::getSize() directly.
      This changes the computed spill weights, but only by a constant factor in each
      function. It should not affect how spill weights compare against each other, and
      so it shouldn't affect code generation.
      
      llvm-svn: 125530
      1dd377d8
  15. Jan 09, 2011
  16. Oct 12, 2010
  17. Oct 08, 2010
  18. Aug 12, 2010
  19. Aug 10, 2010
    • Jakob Stoklund Olesen's avatar
      Give up on register class recalculation when the register is used with subreg · 57f3db6e
      Jakob Stoklund Olesen authored
      operands. We don't currently have a hook to provide "the largest super class of
      A where all registers' getSubReg(subidx) is valid and in B".
      
      llvm-svn: 110730
      57f3db6e
    • Jakob Stoklund Olesen's avatar
      Implement register class inflation. · 53c50220
      Jakob Stoklund Olesen authored
      When splitting a live range, the new registers have fewer uses and the
      permissible register class may be less constrained. Recompute the register class
      constraint from the uses of new registers created for a split. This may let them
      be allocated from a larger set, possibly avoiding a spill.
      
      llvm-svn: 110703
      53c50220
    • Jakob Stoklund Olesen's avatar
      Transpose the calculation of spill weights such that we are calculating one · e00c49da
      Jakob Stoklund Olesen authored
      register at a time. This turns out to be slightly faster than iterating over
      instructions, but more importantly, it allows us to compute spill weights for
      new registers created after the spill weight pass has run.
      
      Also compute the allocation hint at the same time as the spill weight. This
      allows us to use the spill weight as a cost metric for copies, and choose the
      most profitable hint if there is more than one possibility.
      
      The new hints provide a very small (< 0.1%) but universal code size improvement.
      
      llvm-svn: 110631
      e00c49da
  20. Jul 22, 2010
  21. Jul 16, 2010
  22. Jul 03, 2010
  23. Feb 18, 2010
    • Jakob Stoklund Olesen's avatar
      Always normalize spill weights, also for intervals created by spilling. · c953acbd
      Jakob Stoklund Olesen authored
      Moderate the weight given to very small intervals.
      
      The spill weight given to new intervals created when spilling was not
      normalized in the same way as the original spill weights calculated by
      CalcSpillWeights. That meant that restored registers would tend to hang around
      because they had a much higher spill weight that unspilled registers.
      
      This improves the runtime of a few tests by up to 10%, and there are no
      significant regressions.
      
      llvm-svn: 96613
      c953acbd
  24. Feb 10, 2010
  25. Feb 09, 2010
  26. Dec 24, 2009
    • David Greene's avatar
      · e40730d8
      David Greene authored
      Change errs() to dbgs().
      
      llvm-svn: 92099
      e40730d8
  27. Dec 22, 2009
  28. Dec 14, 2009
Loading