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
This commit is contained in:
Alkis Evlogimenos 2004-09-09 19:24:38 +00:00
parent 1739aec9e1
commit 2c4f7b5faa

View File

@ -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()) {