[llvm-commits] [llvm] r162256 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Michael Liao
michael.liao at intel.com
Mon Aug 20 22:55:22 PDT 2012
Author: hliao
Date: Tue Aug 21 00:55:22 2012
New Revision: 162256
URL: http://llvm.org/viewvc/llvm-project?rev=162256&view=rev
Log:
revise debug output to avoid dangling pointer
Modified:
llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=162256&r1=162255&r2=162256&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Tue Aug 21 00:55:22 2012
@@ -220,6 +220,7 @@
BranchInst *Term = dyn_cast<BranchInst>(SinglePred->getTerminator());
if (Term && !Term->isConditional()) {
Changed = true;
+ DEBUG(dbgs() << "To merge:\n"<< *SinglePred << "\n\n\n");
// Remember if SinglePred was the entry block of the function.
// If so, we will need to move BB back to the entry position.
bool isEntry = SinglePred == &SinglePred->getParent()->getEntryBlock();
@@ -230,7 +231,6 @@
// We have erased a block. Update the iterator.
I = BB;
- DEBUG(dbgs() << "Merged:\n"<< *SinglePred << "\n\n\n");
}
}
return Changed;
More information about the llvm-commits
mailing list