summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit31953c7a10124fc950aadb180ff54f0a97610e54 (patch)
tree5b815d7985f8d40f6c6df2d4c84fab6f0f0b41e2 /llvm/lib/CodeGen/RegAllocLinearScan.cpp
parentb76d234ee930bd94fe3401003ffb0d4a70688cb1 (diff)
downloadbcm5719-llvm-31953c7a10124fc950aadb180ff54f0a97610e54.tar.gz
bcm5719-llvm-31953c7a10124fc950aadb180ff54f0a97610e54.zip
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.
llvm-svn: 12062
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
index d6c53cd0a72..e92abe10bd3 100644
--- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud