Begin implementation of an inline spiller.

InlineSpiller inserts loads and spills immediately instead of deferring to
VirtRegMap. This is possible now because SlotIndexes allows instructions to be
inserted and renumbered.

This is work in progress, and is mostly a copy of TrivialSpiller so far. It
works very well for functions that don't require spilling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107227 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2010-06-29 23:58:39 +00:00
parent 6c9fa43716
commit 914f2ff9e6
4 changed files with 159 additions and 2 deletions
+10 -1
View File
@@ -26,7 +26,7 @@
using namespace llvm;
namespace {
enum SpillerName { trivial, standard, splitting };
enum SpillerName { trivial, standard, splitting, inline_ };
}
static cl::opt<SpillerName>
@@ -36,6 +36,7 @@ spillerOpt("spiller",
cl::values(clEnumVal(trivial, "trivial spiller"),
clEnumVal(standard, "default spiller"),
clEnumVal(splitting, "splitting spiller"),
"inline", inline_, "inline spiller",
clEnumValEnd),
cl::init(standard));
@@ -506,6 +507,13 @@ private:
} // end anonymous namespace
namespace llvm {
Spiller *createInlineSpiller(MachineFunction*,
LiveIntervals*,
const MachineLoopInfo*,
VirtRegMap*);
}
llvm::Spiller* llvm::createSpiller(MachineFunction *mf, LiveIntervals *lis,
const MachineLoopInfo *loopInfo,
VirtRegMap *vrm) {
@@ -514,5 +522,6 @@ llvm::Spiller* llvm::createSpiller(MachineFunction *mf, LiveIntervals *lis,
case trivial: return new TrivialSpiller(mf, lis, vrm);
case standard: return new StandardSpiller(lis, loopInfo, vrm);
case splitting: return new SplittingSpiller(mf, lis, loopInfo, vrm);
case inline_: return createInlineSpiller(mf, lis, loopInfo, vrm);
}
}