diff options
| author | Mark Heffernan <meheff@google.com> | 2014-11-04 01:51:01 +0000 |
|---|---|---|
| committer | Mark Heffernan <meheff@google.com> | 2014-11-04 01:51:01 +0000 |
| commit | 2e25042a937e0e2762c8ef35a3a30ec8f9930406 (patch) | |
| tree | 004da9e8ec3cdff84dec8d649f603e50c712a622 /llvm/lib/Transforms | |
| parent | 04162eaced201901d81fcacee6348485176737aa (diff) | |
| download | bcm5719-llvm-2e25042a937e0e2762c8ef35a3a30ec8f9930406.tar.gz bcm5719-llvm-2e25042a937e0e2762c8ef35a3a30ec8f9930406.zip | |
Remove setPreservesCFG from instcombine. The pass, in particular, does not
preserve LoopSimplify because instcombine may replace branch predicates
with undef which loop simplify then replaces with always exit. Replace
setPreservesCFG with the more constrained preservation of DomTree and
LoopInfo.
llvm-svn: 221223
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index 5a0b01eca5c..4b7f841e2cd 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -90,7 +90,8 @@ INITIALIZE_PASS_END(InstCombiner, "instcombine", "Combine redundant instructions", false, false) void InstCombiner::getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesCFG(); + AU.addPreserved<DominatorTreeWrapperPass>(); + AU.addPreserved<LoopInfo>(); AU.addRequired<AssumptionTracker>(); AU.addRequired<TargetLibraryInfo>(); } |

