diff options
author | Duncan Sands <baldrick@free.fr> | 2010-11-14 18:36:10 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-11-14 18:36:10 +0000 |
commit | eff0581583ef10e2872e9baf537a04b67d992101 (patch) | |
tree | 4aff00b570f7058263f492f0ec91f8e59119547a /lib/Transforms | |
parent | 0094345184bc0a791f0811c8d7f5b6f9c8296e0f (diff) |
If dom tree information is available, make it possible to pass
it to get better phi node simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index db3cd80364..732f6c823c 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/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/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index eb05f995c7..009ee7b95e 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/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; } |