[llvm-commits] [llvm] r128399 - /llvm/trunk/lib/Transforms/InstCombine/InstCombine.h

Frits van Bommel fvbommel at gmail.com
Sun Mar 27 16:32:31 PDT 2011


Author: fvbommel
Date: Sun Mar 27 18:32:31 2011
New Revision: 128399

URL: http://llvm.org/viewvc/llvm-project?rev=128399&view=rev
Log:
Add some debug output when -instcombine uses RAUW. This can make debug output for those cases much clearer since without this it only showed that the original instruction was removed, not what it was replaced with.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombine.h

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombine.h?rev=128399&r1=128398&r2=128399&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombine.h (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombine.h Sun Mar 27 18:32:31 2011
@@ -246,7 +246,10 @@
     // segment of unreachable code, so just clobber the instruction.
     if (&I == V) 
       V = UndefValue::get(I.getType());
-      
+
+    DEBUG(errs() << "IC: Replacing " << I << "\n"
+                    "    with " << *V << '\n');
+
     I.replaceAllUsesWith(V);
     return &I;
   }





More information about the llvm-commits mailing list