[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Thu Sep 9 14:24:49 CDT 2004



Changes in directory llvm/lib/CodeGen:

LiveIntervalAnalysis.cpp updated: 1.125 -> 1.126
---
Log message:

Grow the map on entry so that we don't crash if joinIntervals never
runs (if coalescing is disabled for example).


---
Diffs of the changes:  (+1 -2)

Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.125 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.126
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.125	Tue Sep  7 22:01:50 2004
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp	Thu Sep  9 14:24:38 2004
@@ -88,6 +88,7 @@
   mri_ = tm_->getRegisterInfo();
   lv_ = &getAnalysis<LiveVariables>();
   allocatableRegs_ = mri_->getAllocatableSet(fn);
+  r2rMap_.grow(mf_->getSSARegMap()->getLastVirtReg());
 
   // number MachineInstrs
   unsigned miIndex = 0;
@@ -619,8 +620,6 @@
 
 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()) {






More information about the llvm-commits mailing list