aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/GVN.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 222320f..946c33e 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -1158,8 +1158,18 @@ bool GVN::processLoad(LoadInst *L, SmallVectorImpl<Instruction*> &toErase) {
MemDepResult dep = MD->getDependency(L);
// If the value isn't available, don't do anything!
- if (dep.isClobber())
+ if (dep.isClobber()) {
+ DEBUG(
+ // fast print dep, using operator<< on instruction would be too slow
+ DOUT << "GVN: load ";
+ WriteAsOperand(*DOUT.stream(), L);
+ Instruction *I = dep.getInst();
+ DOUT << " is clobbered by " << I->getOpcodeName() << " instruction ";
+ WriteAsOperand(*DOUT.stream(), I, false);
+ DOUT << "\n";
+ );
return false;
+ }
// If it is defined in another block, try harder.
if (dep.isNonLocal())