From: Alkis Evlogimenos Date: Thu, 9 Sep 2004 19:24:38 +0000 (+0000) Subject: Grow the map on entry so that we don't crash if joinIntervals never X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c4f7b5faaeedd97058ec4cfa44177124c42b9e1;p=oota-llvm.git 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 --- 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()) {