summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-09-09 19:24:38 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-09-09 19:24:38 +0000
commit213e6db9ce2fda45afe32cc07a2a14edbd956732 (patch)
tree1c86af8f43da49e7fc70b0a2c70d674c4cbdb70d /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent4657235e361a45e4b90850fc558f812182d0a866 (diff)
downloadbcm5719-llvm-213e6db9ce2fda45afe32cc07a2a14edbd956732.tar.gz
bcm5719-llvm-213e6db9ce2fda45afe32cc07a2a14edbd956732.zip
Grow the map on entry so that we don't crash if joinIntervals never
runs (if coalescing is disabled for example). llvm-svn: 16259
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index e0fefc3870f..04978d62e82 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/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()) {
OpenPOWER on IntegriCloud