diff options
| author | Fedor Sergeev <fedor.sergeev@azul.com> | 2017-12-14 10:36:31 +0000 |
|---|---|---|
| committer | Fedor Sergeev <fedor.sergeev@azul.com> | 2017-12-14 10:36:31 +0000 |
| commit | 83bcc68afa1907f1e86321f25a72342f0c9a714f (patch) | |
| tree | 79c8a6eb8eae4f6d79651bb2ec99abc4cfb185e8 /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | |
| parent | 84693033b48e210d0641dd203145617e3db39dc6 (diff) | |
| download | bcm5719-llvm-83bcc68afa1907f1e86321f25a72342f0c9a714f.tar.gz bcm5719-llvm-83bcc68afa1907f1e86321f25a72342f0c9a714f.zip | |
[PM][InstCombine] fixing omission of AliasAnalysis in new-pass-manager's version of InstCombine
Summary:
Passing AliasAnalysis results instead of nullptr appears to work just fine.
A couple new-pass-manager tests updated to align with new order of analyses.
Reviewers: chandlerc, spatel, craig.topper
Reviewed By: chandlerc
Subscribers: mehdi_amini, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D41203
llvm-svn: 320687
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index f272f8273d1..b332e75c7fe 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -3276,8 +3276,8 @@ PreservedAnalyses InstCombinePass::run(Function &F, auto *LI = AM.getCachedResult<LoopAnalysis>(F); - // FIXME: The AliasAnalysis is not yet supported in the new pass manager - if (!combineInstructionsOverFunction(F, Worklist, nullptr, AC, TLI, DT, ORE, + auto *AA = &AM.getResult<AAManager>(F); + if (!combineInstructionsOverFunction(F, Worklist, AA, AC, TLI, DT, ORE, ExpensiveCombines, LI)) // No changes, all analyses are preserved. return PreservedAnalyses::all(); @@ -3286,6 +3286,7 @@ PreservedAnalyses InstCombinePass::run(Function &F, PreservedAnalyses PA; PA.preserveSet<CFGAnalyses>(); PA.preserve<AAManager>(); + PA.preserve<BasicAA>(); PA.preserve<GlobalsAA>(); return PA; } |

