diff options
author | Dale Johannesen <dalej@apple.com> | 2010-01-22 22:38:21 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-01-22 22:38:21 +0000 |
commit | 7048797468a1d9de2ff7b63ff212d0cb6ae653a5 (patch) | |
tree | 7be529250fc9d48721cf71f470ffd3f81a32c6f6 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | edf96a4cc3c7968570581361f44b70fc9ec33e09 (diff) | |
download | bcm5719-llvm-7048797468a1d9de2ff7b63ff212d0cb6ae653a5.tar.gz bcm5719-llvm-7048797468a1d9de2ff7b63ff212d0cb6ae653a5.zip |
Ignore DEBUG_VALUE when building live intervals;
this makes the code work transparently the same
whether they're there or not.
llvm-svn: 94240
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index e0e2ec8f12b..8746bf90865 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -140,7 +140,10 @@ void LiveIntervals::printInstrs(raw_ostream &OS) const { << ":\t\t# derived from " << mbbi->getName() << "\n"; for (MachineBasicBlock::iterator mii = mbbi->begin(), mie = mbbi->end(); mii != mie; ++mii) { - OS << getInstructionIndex(mii) << '\t' << *mii; + if (mii->getOpcode()==TargetInstrInfo::DEBUG_VALUE) + OS << SlotIndex::getEmptyKey() << '\t' << *mii; + else + OS << getInstructionIndex(mii) << '\t' << *mii; } } } @@ -672,8 +675,6 @@ void LiveIntervals::computeIntervals() { SlotIndex MIIndex = getMBBStartIdx(MBB); DEBUG(dbgs() << MBB->getName() << ":\n"); - MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end(); - // Create intervals for live-ins to this BB first. for (MachineBasicBlock::const_livein_iterator LI = MBB->livein_begin(), LE = MBB->livein_end(); LI != LE; ++LI) { @@ -689,8 +690,11 @@ void LiveIntervals::computeIntervals() { if (getInstructionFromIndex(MIIndex) == 0) MIIndex = indexes_->getNextNonNullIndex(MIIndex); - for (; MI != miEnd; ++MI) { + for (MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end(); + MI != miEnd; ++MI) { DEBUG(dbgs() << MIIndex << "\t" << *MI); + if (MI->getOpcode()==TargetInstrInfo::DEBUG_VALUE) + continue; // Handle defs. for (int i = MI->getNumOperands() - 1; i >= 0; --i) { |