Skip to content
  1. Jun 09, 2012
    • Jakob Stoklund Olesen's avatar
      Reintroduce VirtRegRewriter. · 1224312f
      Jakob Stoklund Olesen authored
      OK, not really. We don't want to reintroduce the old rewriter hacks.
      
      This patch extracts virtual register rewriting as a separate pass that
      runs after the register allocator. This is possible now that
      CodeGen/Passes.cpp can configure the full optimizing register allocator
      pipeline.
      
      The rewriter pass uses register assignments in VirtRegMap to rewrite
      virtual registers to physical registers, and it inserts kill flags based
      on live intervals.
      
      These finalization steps are the same for the optimizing register
      allocators: RABasic, RAGreedy, and PBQP.
      
      llvm-svn: 158244
      1224312f
  2. Jun 06, 2012
  3. Jun 02, 2012
    • Jakob Stoklund Olesen's avatar
      Switch all register list clients to the new MC*Iterator interface. · 54038d79
      Jakob Stoklund Olesen authored
      No functional change intended.
      
      Sorry for the churn. The iterator classes are supposed to help avoid
      giant commits like this one in the future. The TableGen-produced
      register lists are getting quite large, and it may be necessary to
      change the table representation.
      
      This makes it possible to do so without changing all clients (again).
      
      llvm-svn: 157854
      54038d79
  4. May 30, 2012
    • Jakob Stoklund Olesen's avatar
      Prioritize smaller register classes for urgent evictions. · 05e2245f
      Jakob Stoklund Olesen authored
      It helps compile exotic inline asm. In the test case, normal GR32
      virtual registers use up eax-edx so the final GR32_ABCD live range has
      no registers left. Since all the live ranges were tiny, we had no way of
      prioritizing the smaller register class.
      
      This patch allows tiny unspillable live ranges to be evicted by tiny
      unspillable live ranges from a smaller register class.
      
      <rdar://problem/11542429>
      
      llvm-svn: 157715
      05e2245f
  5. May 24, 2012
  6. May 19, 2012
  7. Apr 03, 2012
  8. Mar 04, 2012
  9. Feb 21, 2012
    • Andrew Trick's avatar
      Clear virtual registers after they are no longer referenced. · da84e646
      Andrew Trick authored
      Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0.
      This makes sharing code for pre/postRA passes more robust.
      Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA().
      To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs().
      
      PEI resets virtual regs when it's done scavenging.
      
      PTX will either have to provide its own PEI pass or assign physregs.
      
      llvm-svn: 151032
      da84e646
  10. Feb 15, 2012
  11. Feb 11, 2012
  12. Feb 10, 2012
    • Jakob Stoklund Olesen's avatar
      Add register mask support to InterferenceCache. · a16ae597
      Jakob Stoklund Olesen authored
      This makes global live range splitting behave identically with and
      without register mask operands.
      
      This is not necessarily the best way of using register masks for live
      range splitting.  It would be more efficient to first split global live
      ranges around calls (i.e., register masks), and reserve the fine grained
      per-physreg interference guidance for global live ranges that do not
      cross calls.
      
      For now the goal is to produce identical assembly when enabling register
      masks.
      
      llvm-svn: 150259
      a16ae597
    • Andrew Trick's avatar
      RegAlloc superpass: includes phi elimination, coalescing, and scheduling. · d3f8fe81
      Andrew Trick authored
      Creates a configurable regalloc pipeline.
      
      Ensure specific llc options do what they say and nothing more: -reglloc=... has no effect other than selecting the allocator pass itself. This patch introduces a new umbrella flag, "-optimize-regalloc", to enable/disable the optimizing regalloc "superpass". This allows for example testing coalscing and scheduling under -O0 or vice-versa.
      
      When a CodeGen pass requires the MachineFunction to have a particular property, we need to explicitly define that property so it can be directly queried rather than naming a specific Pass. For example, to check for SSA, use MRI->isSSA, not addRequired<PHIElimination>.
      
      CodeGen transformation passes are never "required" as an analysis
      
      ProcessImplicitDefs does not require LiveVariables.
      
      We have a plan to massively simplify some of the early passes within the regalloc superpass.
      
      llvm-svn: 150226
      d3f8fe81
  13. Feb 09, 2012
  14. Jan 17, 2012
  15. Jan 13, 2012
  16. Jan 12, 2012
  17. Nov 13, 2011
  18. Nov 01, 2011
  19. Sep 14, 2011
  20. Sep 12, 2011
    • Jakob Stoklund Olesen's avatar
      Remove the -compact-regions flag. · 45df7e0f
      Jakob Stoklund Olesen authored
      It has been enabled by default for a while, it was only there to allow
      performance comparisons.
      
      llvm-svn: 139501
      45df7e0f
    • Jakob Stoklund Olesen's avatar
      Add an interface for SplitKit complement spill modes. · eecb2fb1
      Jakob Stoklund Olesen authored
      SplitKit always computes a complement live range to cover the places
      where the original live range was live, but no explicit region has been
      allocated.
      
      Currently, the complement live range is created to be as small as
      possible - it never overlaps any of the regions.  This minimizes
      register pressure, but if the complement is going to be spilled anyway,
      that is not very important.  The spiller will eliminate redundant
      spills, and hoist others by making the spill slot live range overlap
      some of the regions created by splitting.  Stack slots are cheap.
      
      This patch adds the interface to enable spill modes in SplitKit.  In
      spill mode, SplitKit will assume that the complement is going to spill,
      so it will allow it to overlap regions in order to avoid back-copies.
      By doing some of the spiller's work early, the complement live range
      becomes simpler.  In some cases, it can become much simpler because no
      extra PHI-defs are required.  This will speed up both splitting and
      spilling.
      
      This is only the interface to enable spill modes, no implementation yet.
      
      llvm-svn: 139500
      eecb2fb1
  21. Aug 19, 2011
  22. Aug 09, 2011
  23. Aug 06, 2011
  24. Aug 04, 2011
    • Jakob Stoklund Olesen's avatar
      Enable compact region splitting by default. · 11b788d5
      Jakob Stoklund Olesen authored
      This helps generate better code in functions with high register
      pressure.
      
      The previous version of compact region splitting caused regressions
      because the regions were a bit too large. A stronger negative bias
      applied in r136832 fixed this problem.
      
      llvm-svn: 136836
      11b788d5
    • Jakob Stoklund Olesen's avatar
      Be more conservative when forming compact regions. · 86954520
      Jakob Stoklund Olesen authored
      Apply twice the negative bias on transparent blocks when computing the
      compact regions. This excludes loop backedges from the region when only
      one of the loop blocks uses the register.
      
      Previously, we would include the backedge in the region if the loop
      preheader and the loop latch both used the register, but the loop header
      didn't.
      
      When both the header and latch blocks use the register, we still keep it
      live on the backedge.
      
      llvm-svn: 136832
      86954520
    • Chandler Carruth's avatar
      Fix some warnings from Clang in release builds: · 77eb5a0a
      Chandler Carruth authored
      lib/CodeGen/RegAllocGreedy.cpp:1176:18: warning: unused variable 'B' [-Wunused-variable]
          if (unsigned B = Cand.getBundles(BundleCand, BestCand)) {
                       ^
      lib/CodeGen/RegAllocGreedy.cpp:1188:18: warning: unused variable 'B' [-Wunused-variable]
          if (unsigned B = Cand.getBundles(BundleCand, 0)) {
                       ^
      
      llvm-svn: 136831
      77eb5a0a
  25. Aug 03, 2011
Loading