summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegisterCoalescer.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-22 19:51:41 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-22 19:51:41 +0000
commit04ce06dc4c9dff4ff7a8b97079e3cbb7b60da3ab (patch)
treea9aafea8e83cfd3dd7a93706bc320d4e5da0ac1b /lib/CodeGen/RegisterCoalescer.cpp
parentb150930910a254377a62ed74af981c37eafe8fcb (diff)
downloadllvm-04ce06dc4c9dff4ff7a8b97079e3cbb7b60da3ab.tar.gz
llvm-04ce06dc4c9dff4ff7a8b97079e3cbb7b60da3ab.tar.bz2
llvm-04ce06dc4c9dff4ff7a8b97079e3cbb7b60da3ab.tar.xz
Fix a crash in --debug code.
Don't try to print out the live range of a physreg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r--lib/CodeGen/RegisterCoalescer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp
index 7ef525d9f3..19b6ffcb51 100644
--- a/lib/CodeGen/RegisterCoalescer.cpp
+++ b/lib/CodeGen/RegisterCoalescer.cpp
@@ -1053,8 +1053,12 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
// Update regalloc hint.
TRI->UpdateRegAllocHint(CP.getSrcReg(), CP.getDstReg(), *MF);
- DEBUG(dbgs() << "\tJoined. Result = " << PrintReg(CP.getDstReg(), TRI)
- << ' ' << LIS->getInterval(CP.getDstReg()) << '\n');
+ DEBUG({
+ dbgs() << "\tJoined. Result = " << PrintReg(CP.getDstReg(), TRI);
+ if (!CP.isPhys())
+ dbgs() << LIS->getInterval(CP.getDstReg());
+ dbgs() << '\n';
+ });
++numJoins;
return true;