summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-11-14 18:36:10 +0000
committerDuncan Sands <baldrick@free.fr>2010-11-14 18:36:10 +0000
commitb99f39b9f6768070e6819ae01505165aa2f59d88 (patch)
tree579d66882602e95b70bd435d2dc3d06d9a3dfe06 /llvm/lib/Transforms
parent56477d169087f053115686a1e993975b4f612d58 (diff)
downloadbcm5719-llvm-b99f39b9f6768070e6819ae01505165aa2f59d88.tar.gz
bcm5719-llvm-b99f39b9f6768070e6819ae01505165aa2f59d88.zip
If dom tree information is available, make it possible to pass
it to get better phi node simplification. llvm-svn: 119055
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/LoopUnswitch.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index db3cd803645..732f6c823cc 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -1903,7 +1903,7 @@ bool GVN::processInstruction(Instruction *I,
// to value numbering it. Value numbering often exposes redundancies, for
// example if it determines that %y is equal to %x then the instruction
// "%z = and i32 %x, %y" becomes "%z = and i32 %x, %x" which we now simplify.
- if (Value *V = SimplifyInstruction(I, TD)) {
+ if (Value *V = SimplifyInstruction(I, TD, DT)) {
I->replaceAllUsesWith(V);
if (MD && V->getType()->isPointerTy())
MD->invalidateCachedPointerInfo(V);
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
index eb05f995c78..009ee7b95ea 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -994,7 +994,7 @@ void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L) {
// See if instruction simplification can hack this up. This is common for
// things like "select false, X, Y" after unswitching made the condition be
// 'false'.
- if (Value *V = SimplifyInstruction(I)) {
+ if (Value *V = SimplifyInstruction(I, 0, DT)) {
ReplaceUsesOfWith(I, V, Worklist, L, LPM);
continue;
}
OpenPOWER on IntegriCloud