[PATCH] D41203: [PM][InstCombine] fixing omission of AliasAnalysis in new-pass-manager's version of InstCombine

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 22:57:28 PST 2017


chandlerc added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:3289
   PA.preserve<AAManager>();
+  PA.preserve<BasicAA>();
   PA.preserve<GlobalsAA>();
----------------
skatkov wrote:
> Chandler, may be you can answer this question: why do we need to preserve BasicAA if we already preserved AAManager?
The AA manager just brokers access to the various different alias analyses. You still need to preserve the analyses themselves.

Now that the invalidation support is fully wired up, we could probably remove the need to explicitly preserve the AAManager and just have it remain preserved automatically if all of the AAs are preserved. But it isn't a big deal. The only cost to invalidating the AAManager is that we have to go and look up the N different alias analyses for the next pass.


https://reviews.llvm.org/D41203





More information about the llvm-commits mailing list