Skip to content
  1. Sep 16, 2011
    • Benjamin Kramer's avatar
      Namespacify. · 67b014b2
      Benjamin Kramer authored
      llvm-svn: 139892
      67b014b2
    • Jakob Stoklund Olesen's avatar
      Spill mode: Hoist back-copies locally. · e2c92a31
      Jakob Stoklund Olesen authored
      The leaveIntvAfter() function normally inserts a back-copy after the
      requested instruction, making the back-copy kill the live range.
      
      In spill mode, try to insert the back-copy before the last use instead.
      That means the last use becomes the kill instead of the back-copy.  This
      lowers the register pressure because the last use can now redefine the
      same register it was reading.
      
      This will also improve compile time: The back-copy isn't a kill, so
      hoisting it in hoistCopiesForSize() won't force a recomputation of the
      source live range.  Similarly, if the back-copy isn't hoisted by the
      splitter, the spiller will not attempt hoisting it locally.
      
      llvm-svn: 139883
      e2c92a31
    • Jakob Stoklund Olesen's avatar
      Disable local spill hoisting for non-killing copies. · e8339b2e
      Jakob Stoklund Olesen authored
      If the source register is live after the copy being spilled, there is no
      point to hoisting it.  Hoisting inside a basic block only serves to
      resolve interferences by shortening the live range of the source.
      
      llvm-svn: 139882
      e8339b2e
  2. Sep 15, 2011
  3. Sep 14, 2011
    • Jakob Stoklund Olesen's avatar
      Ignore the cloning of unknown registers. · 811b9c47
      Jakob Stoklund Olesen authored
      THe LRE_DidCloneVirtReg callback may be called with vitual registers
      that RAGreedy doesn't even know about yet.  In that case, there are no
      data structures to update.
      
      llvm-svn: 139702
      811b9c47
    • Jakob Stoklund Olesen's avatar
      Hoist back-copies to the least busy dominator. · a98af398
      Jakob Stoklund Olesen authored
      When a back-copy is hoisted to the nearest common dominator, keep
      looking up the dominator tree for a less loopy dominator, and place the
      back-copy there instead.
      
      Don't do this when a single existing back-copy dominates all the others.
      Assume the client knows what he is doing, and keep the dominating
      back-copy.
      
      This prevents us from hoisting back-copies into loops in most cases.  If
      a value is defined in a loop with multiple exits, we may still hoist
      back-copies into that loop.  That is the speed/size tradeoff.
      
      llvm-svn: 139698
      a98af398
    • Nadav Rotem's avatar
      Add integer promotion support for vselect · d748dbac
      Nadav Rotem authored
      llvm-svn: 139692
      d748dbac
    • Jakob Stoklund Olesen's avatar
      Distinguish complex mapped values from forced recomputation. · 5d4277dd
      Jakob Stoklund Olesen authored
      When a ParentVNI maps to multiple defs in a new interval, its live range
      may still be derived directly from RegAssign by transferValues().
      
      On the other hand, when instructions have been rematerialized or
      hoisted, it may be necessary to completely recompute live ranges using
      LiveRangeCalc::extend() to all uses.
      
      Use a bit in the value map to indicate that a live range must be
      recomputed.  Rename markComplexMapped() to forceRecompute().
      
      This fixes some live range verification errors when
      -split-spill-mode=size hoists back-copies by recomputing source ranges
      when RegAssign kills can't be moved.
      
      llvm-svn: 139660
      5d4277dd
    • Jakob Stoklund Olesen's avatar
      Implement -split-spill-mode=size. · a25330f0
      Jakob Stoklund Olesen authored
      Whenever the complement interval is defined by multiple copies of the
      same value, hoist those back-copies to the nearest common dominator.
      
      This ensures that at most one copy is inserted per value in the
      complement inteval, and no phi-defs are needed.
      
      llvm-svn: 139651
      a25330f0
    • Eli Friedman's avatar
      f78c6a83
  4. Sep 13, 2011
  5. Sep 12, 2011
    • Bill Wendling's avatar
      Introduce a bit of a hack. · ac5a8836
      Bill Wendling authored
      Splitting a landing pad takes considerable care because of PHIs and other
      nasties. The problem is that the jump table needs to jump to the landing pad
      block. However, the landing pad block can be jumped to only by an invoke
      instruction. So we clone the landingpad instruction into its own basic block,
      have the invoke jump to there. The landingpad instruction's basic block's
      successor is now the target for the jump table.
      
      But because of PHI nodes, we need to create another basic block for the jump
      table to jump to. This is definitely a hack, because the values for the PHI
      nodes may not be defined on the edge from the jump table. But that's okay,
      because the jump table is simply a construct to mimic what is happening in the
      CFG. So the values are mysteriously there, even though there is no value for the
      PHI from the jump table's edge (hence calling this a hack).
      
      llvm-svn: 139545
      ac5a8836
    • 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
    • Jakob Stoklund Olesen's avatar
      Update comments to reflect some (not so) recent changes. · 72c0ddfb
      Jakob Stoklund Olesen authored
      llvm-svn: 139498
      72c0ddfb
  6. Sep 10, 2011
  7. Sep 09, 2011
Loading