summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-09-24 16:37:40 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-09-24 16:37:40 +0000
commit30d249a1b33697d73b30076937ea3b6e7af39454 (patch)
tree0d86a9450b16f2408f92572f3138d0521ccb4c63 /llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
parente5ba87b6bb682d0315743242f154b0900db02cb0 (diff)
downloadbcm5719-llvm-30d249a1b33697d73b30076937ea3b6e7af39454.tar.gz
bcm5719-llvm-30d249a1b33697d73b30076937ea3b6e7af39454.zip
Push analysis passes to InstSimplify when they're around anyways.
llvm-svn: 191309
Diffstat (limited to 'llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 9c5633b4e7f..9b56a769627 100644
--- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -1893,7 +1893,8 @@ bool CodeGenPrepare::OptimizeInst(Instruction *I) {
// It is possible for very late stage optimizations (such as SimplifyCFG)
// to introduce PHI nodes too late to be cleaned up. If we detect such a
// trivial PHI, go ahead and zap it here.
- if (Value *V = SimplifyInstruction(P)) {
+ if (Value *V = SimplifyInstruction(P, TLI ? TLI->getDataLayout() : 0,
+ TLInfo, DT)) {
P->replaceAllUsesWith(V);
P->eraseFromParent();
++NumPHIsElim;
OpenPOWER on IntegriCloud