summaryrefslogtreecommitdiff
path: root/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
commitc46570dc05851395829bef904bb6ddb1260400d1 (patch)
tree179a2496f8f6beed6e7129a59a84a99c04760a6d /lib/CodeGen/LiveRangeEdit.cpp
parentebe8173941238cfbabadb1c63bca7fb7dcf2adbe (diff)
downloadllvm-c46570dc05851395829bef904bb6ddb1260400d1.tar.gz
llvm-c46570dc05851395829bef904bb6ddb1260400d1.tar.bz2
llvm-c46570dc05851395829bef904bb6ddb1260400d1.tar.xz
Clarify debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r--lib/CodeGen/LiveRangeEdit.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp
index c9985cd9d2..0769f95262 100644
--- a/lib/CodeGen/LiveRangeEdit.cpp
+++ b/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