Skip to content
  • 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
Loading