diff options
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index d6c53cd..e92abe1 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; } |