diff options
author | Frits van Bommel <fvbommel@gmail.com> | 2011-03-27 23:32:31 +0000 |
---|---|---|
committer | Frits van Bommel <fvbommel@gmail.com> | 2011-03-27 23:32:31 +0000 |
commit | d14d991bf76e5cb040cae63ac87ef49ce23ff1a2 (patch) | |
tree | a76b6a2d43c37752e59ab487d85d9980f2f2884d /llvm/lib/Transforms | |
parent | bd6b86e48953bcd7e9533ec7408e5d2c8e247a4d (diff) | |
download | bcm5719-llvm-d14d991bf76e5cb040cae63ac87ef49ce23ff1a2.tar.gz bcm5719-llvm-d14d991bf76e5cb040cae63ac87ef49ce23ff1a2.zip |
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.
llvm-svn: 128399
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombine.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombine.h b/llvm/lib/Transforms/InstCombine/InstCombine.h index 0da962a5f40..d5de53aa926 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombine.h +++ b/llvm/lib/Transforms/InstCombine/InstCombine.h @@ -246,7 +246,10 @@ public: // 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; } |