diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-09-09 19:24:38 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-09-09 19:24:38 +0000 |
commit | 2c4f7b5faaeedd97058ec4cfa44177124c42b9e1 (patch) | |
tree | 64860c0f30f0071eb76d94e4de0fae0f3397c45f /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 1739aec9e174e4a4f3a162ccbe4137d74ebc1d0d (diff) |
Grow the map on entry so that we don't crash if joinIntervals never
runs (if coalescing is disabled for example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index e0fefc3870..04978d62e8 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -88,6 +88,7 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) { mri_ = tm_->getRegisterInfo(); lv_ = &getAnalysis<LiveVariables>(); allocatableRegs_ = mri_->getAllocatableSet(fn); + r2rMap_.grow(mf_->getSSARegMap()->getLastVirtReg()); // number MachineInstrs unsigned miIndex = 0; @@ -619,8 +620,6 @@ namespace { void LiveIntervals::joinIntervals() { DEBUG(std::cerr << "********** JOINING INTERVALS ***********\n"); - // reserve space for the reg2reg map - r2rMap_.grow(mf_->getSSARegMap()->getLastVirtReg()); const LoopInfo &LI = getAnalysis<LoopInfo>(); if (LI.begin() == LI.end()) { |