summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveRangeEdit.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-16 22:56:08 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-16 22:56:08 +0000
commit557a82c099283c6afd35a047da0ae4dac742e517 (patch)
treeb2ffbff71c994705b90c597e6be606e2589aa1f0 /llvm/lib/CodeGen/LiveRangeEdit.cpp
parentaaf5ddcf829c7c74bea3ad9f5f879c8c42985d9b (diff)
downloadbcm5719-llvm-557a82c099283c6afd35a047da0ae4dac742e517.tar.gz
bcm5719-llvm-557a82c099283c6afd35a047da0ae4dac742e517.zip
Clarify debugging output.
llvm-svn: 127771
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp
index c9985cd9d22..0769f95262d 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.cpp
+++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp
@@ -148,17 +148,21 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead,
while (!Dead.empty()) {
MachineInstr *MI = Dead.pop_back_val();
assert(MI->allDefsAreDead() && "Def isn't really dead");
+ SlotIndex Idx = LIS.getInstructionIndex(MI).getDefIndex();
// Never delete inline asm.
- if (MI->isInlineAsm())
+ if (MI->isInlineAsm()) {
+ DEBUG(dbgs() << "Won't delete: " << Idx << '\t' << *MI);
continue;
+ }
// Use the same criteria as DeadMachineInstructionElim.
bool SawStore = false;
- if (!MI->isSafeToMove(&TII, 0, SawStore))
+ if (!MI->isSafeToMove(&TII, 0, SawStore)) {
+ DEBUG(dbgs() << "Can't delete: " << Idx << '\t' << *MI);
continue;
+ }
- SlotIndex Idx = LIS.getInstructionIndex(MI).getDefIndex();
DEBUG(dbgs() << "Deleting dead def " << Idx << '\t' << *MI);
// Check for live intervals that may shrink
OpenPOWER on IntegriCloud