aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocLinearScan.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-03-01 23:18:15 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-03-01 23:18:15 +0000
commitdd420e060accd1d773c731e77335cff65ca34013 (patch)
treee6867745c018e3492508920468b993ec30c5ac99 /lib/CodeGen/RegAllocLinearScan.cpp
parent5f37502bfbadfa65de087627bd67fd58bb03725c (diff)
Add a spiller option to llc. A simple spiller will come soon. When we get CFG in the machine code represenation a global spiller will also be possible. Also document the linear scan register allocator but mark it as experimental for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r--lib/CodeGen/RegAllocLinearScan.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp
index d6c53cd0a7..e92abe10bd 100644
--- a/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/lib/CodeGen/RegAllocLinearScan.cpp
@@ -41,6 +41,7 @@ namespace {
std::auto_ptr<PhysRegTracker> prt_;
std::auto_ptr<VirtRegMap> vrm_;
+ std::auto_ptr<Spiller> spiller_;
typedef std::vector<float> SpillWeights;
SpillWeights spillWeights_;
@@ -147,12 +148,13 @@ bool RA::runOnMachineFunction(MachineFunction &fn) {
li_ = &getAnalysis<LiveIntervals>();
if (!prt_.get()) prt_.reset(new PhysRegTracker(*mri_));
vrm_.reset(new VirtRegMap(*mf_));
+ if (!spiller_.get()) spiller_.reset(createSpiller());
initIntervalSets(li_->getIntervals());
linearScan();
- eliminateVirtRegs(*mf_, *vrm_);
+ spiller_->runOnMachineFunction(*mf_, *vrm_);
return true;
}