mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Update SplitEditor API to reflect the fact that the original live interval is
never kept after splitting. Keeping the original interval made sense when the split region doesn't modify the register, and the original is spilled. We can get the same effect by detecting reloaded values when spilling around copies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -107,30 +107,28 @@ Spiller *createInlineSpiller(MachineFunctionPass &pass,
|
||||
bool InlineSpiller::split() {
|
||||
splitAnalysis_.analyze(li_);
|
||||
|
||||
// Try splitting around loops.
|
||||
if (const MachineLoop *loop = splitAnalysis_.getBestSplitLoop()) {
|
||||
// We can split, but li_ may be left intact with fewer uses.
|
||||
if (SplitEditor(splitAnalysis_, lis_, vrm_, *newIntervals_)
|
||||
.splitAroundLoop(loop))
|
||||
return true;
|
||||
SplitEditor(splitAnalysis_, lis_, vrm_, *newIntervals_)
|
||||
.splitAroundLoop(loop);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Try splitting into single block intervals.
|
||||
SplitAnalysis::BlockPtrSet blocks;
|
||||
if (splitAnalysis_.getMultiUseBlocks(blocks)) {
|
||||
if (SplitEditor(splitAnalysis_, lis_, vrm_, *newIntervals_)
|
||||
.splitSingleBlocks(blocks))
|
||||
return true;
|
||||
SplitEditor(splitAnalysis_, lis_, vrm_, *newIntervals_)
|
||||
.splitSingleBlocks(blocks);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Try splitting inside a basic block.
|
||||
if (const MachineBasicBlock *MBB = splitAnalysis_.getBlockForInsideSplit()) {
|
||||
if (SplitEditor(splitAnalysis_, lis_, vrm_, *newIntervals_)
|
||||
.splitInsideBlock(MBB))
|
||||
return true;
|
||||
SplitEditor(splitAnalysis_, lis_, vrm_, *newIntervals_)
|
||||
.splitInsideBlock(MBB);
|
||||
return true;
|
||||
}
|
||||
|
||||
// We may have been able to split out some uses, but the original interval is
|
||||
// intact, and it should still be spilled.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user