diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index e0fefc3870f..04978d62e82 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(); 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(); if (LI.begin() == LI.end()) {