Skip to content
  1. Aug 04, 2011
  2. Aug 03, 2011
  3. Aug 02, 2011
    • Jakob Stoklund Olesen's avatar
      Extend the SpillPlacement interface with two new features. · d2a7d1ed
      Jakob Stoklund Olesen authored
      The PrefBoth constraint is used for blocks that ideally want a live-in
      value both on the stack and in a register. This would be used by a block
      that has a use before interference forces a spill.
      
      Secondly, add the ChangesValue flag to BlockConstraint. This tells
      SpillPlacement if a live-in value on the stack can be reused as a
      live-out stack value for free. If the block redefines the virtual
      register, a spill would be required for that.
      
      This extra information will be used by SpillPlacement to more accurately
      calculate spill costs when a value can exist both on the stack and in a
      register.
      
      The simplest example is a basic block that reads the virtual register,
      but doesn't change its value. Spilling around such a block requires a
      reload, but no spill in the block.
      
      The spiller already knows this, but the spill placer doesn't. That can
      sometimes lead to suboptimal regions.
      
      llvm-svn: 136731
      d2a7d1ed
Loading