mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-16 12:24:44 +00:00
Disable fancy splitting during spilling unless -extra-spiller-splits is given.
This way, InlineSpiller does the same amount of splitting as the standard spiller. Splitting should really be guided by the register allocator, and doesn't belong in the spiller at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118216 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
806e80ef42
commit
8c42f48d02
@ -35,6 +35,10 @@ using namespace llvm;
|
|||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
VerifySpills("verify-spills", cl::desc("Verify after each spill/split"));
|
VerifySpills("verify-spills", cl::desc("Verify after each spill/split"));
|
||||||
|
|
||||||
|
static cl::opt<bool>
|
||||||
|
ExtraSpillerSplits("extra-spiller-splits",
|
||||||
|
cl::desc("Enable additional splitting during splitting"));
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
class InlineSpiller : public Spiller {
|
class InlineSpiller : public Spiller {
|
||||||
MachineFunctionPass &pass_;
|
MachineFunctionPass &pass_;
|
||||||
@ -116,10 +120,13 @@ bool InlineSpiller::split() {
|
|||||||
splitAnalysis_.analyze(&edit_->getParent());
|
splitAnalysis_.analyze(&edit_->getParent());
|
||||||
|
|
||||||
// Try splitting around loops.
|
// Try splitting around loops.
|
||||||
if (const MachineLoop *loop = splitAnalysis_.getBestSplitLoop()) {
|
if (ExtraSpillerSplits) {
|
||||||
SplitEditor(splitAnalysis_, lis_, vrm_, mdt_, *edit_)
|
const MachineLoop *loop = splitAnalysis_.getBestSplitLoop();
|
||||||
.splitAroundLoop(loop);
|
if (loop) {
|
||||||
return true;
|
SplitEditor(splitAnalysis_, lis_, vrm_, mdt_, *edit_)
|
||||||
|
.splitAroundLoop(loop);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try splitting into single block intervals.
|
// Try splitting into single block intervals.
|
||||||
@ -131,10 +138,13 @@ bool InlineSpiller::split() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Try splitting inside a basic block.
|
// Try splitting inside a basic block.
|
||||||
if (const MachineBasicBlock *MBB = splitAnalysis_.getBlockForInsideSplit()) {
|
if (ExtraSpillerSplits) {
|
||||||
SplitEditor(splitAnalysis_, lis_, vrm_, mdt_, *edit_)
|
const MachineBasicBlock *MBB = splitAnalysis_.getBlockForInsideSplit();
|
||||||
.splitInsideBlock(MBB);
|
if (MBB){
|
||||||
return true;
|
SplitEditor(splitAnalysis_, lis_, vrm_, mdt_, *edit_)
|
||||||
|
.splitInsideBlock(MBB);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user