diff options
author | Duncan Sands <baldrick@free.fr> | 2010-11-23 20:24:21 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-11-23 20:24:21 +0000 |
commit | 0f827639df520ac85eca6cc8f826e3fc36c4d171 (patch) | |
tree | 9b168b0e82ae5f17310aa6f0762da5b66bfafa80 /lib/Transforms/Scalar/LoopUnswitch.cpp | |
parent | 13534672deffb571d90f2c2f0a237c67d5aa0594 (diff) |
Constant folding here is pointless, because InstructionSimplify
(which does constant folding and more) is called a few lines
later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120042 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 2eaeb438e0..20d7019c21 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -32,7 +32,6 @@ #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/Instructions.h" -#include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/InlineCost.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/LoopInfo.h" @@ -969,13 +968,7 @@ void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L) { while (!Worklist.empty()) { Instruction *I = Worklist.back(); Worklist.pop_back(); - - // Simple constant folding. - if (Constant *C = ConstantFoldInstruction(I)) { - ReplaceUsesOfWith(I, C, Worklist, L, LPM); - continue; - } - + // Simple DCE. if (isInstructionTriviallyDead(I)) { DEBUG(dbgs() << "Remove dead instruction '" << *I); |