summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-30 23:02:29 +0000
committerChris Lattner <sabre@nondot.org>2006-08-30 23:02:29 +0000
commitcb74860ccebbcc58174c6f7ce2c8a9da08b14128 (patch)
tree3765d8d976df17ce80486679ebb71c2c13dec268 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parentaea29af0bc8a68bfc6674010a1667b47648e205f (diff)
downloadbcm5719-llvm-cb74860ccebbcc58174c6f7ce2c8a9da08b14128.tar.gz
bcm5719-llvm-cb74860ccebbcc58174c6f7ce2c8a9da08b14128.zip
Fix a compiler crash bootstrapping llvm-gcc.
llvm-svn: 29989
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index a26feb3023c..0e9609cdcc6 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -570,7 +570,7 @@ void LiveIntervals::handleRegisterDef(MachineBasicBlock *MBB,
else if (allocatableRegs_[reg]) {
handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(reg));
for (const unsigned* AS = mri_->getAliasSet(reg); *AS; ++AS)
- handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(*AS));
+ handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(*AS), true);
}
}
@@ -684,7 +684,11 @@ bool LiveIntervals::AdjustCopiesBackFrom(LiveInterval &IntA, LiveInterval &IntB,
if (ValLR+1 != BLR) return false;
DEBUG(std::cerr << "\nExtending: "; IntB.print(std::cerr, mri_));
-
+
+ // We are about to delete CopyMI, so need to remove it as the 'instruction
+ // that defines this value #'.
+ IntB.setInstDefiningValNum(BValNo, ~0U);
+
// Okay, we can merge them. We need to insert a new liverange:
// [ValLR.end, BLR.begin) of either value number, then we merge the
// two value numbers.
OpenPOWER on IntegriCloud