Welson Sun via llvm-dev
2017-Jan-28 14:41 UTC
[llvm-dev] AliasAnalysis supported by the new Pass Manager in v3.9 ?
Looking at the InstructionCombining.cpp code: PreservedAnalyses InstCombinePass::run(Function &F, AnalysisManager<Function> &AM) { auto &AC = AM.getResult<AssumptionAnalysis>(F); auto &DT = AM.getResult<DominatorTreeAnalysis>(F); auto &TLI = AM.getResult<TargetLibraryAnalysis>(F); auto *LI = AM.getCachedResult<LoopAnalysis>(F); // FIXME: The AliasAnalysis is not yet supported in the new pass manager Thanks, Welson -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170128/8546aca5/attachment.html>
Mehdi Amini via llvm-dev
2017-Jan-28 19:59 UTC
[llvm-dev] AliasAnalysis supported by the new Pass Manager in v3.9 ?
> On Jan 28, 2017, at 6:41 AM, Welson Sun via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Looking at the InstructionCombining.cpp code:What is the question? Please also note that the new pass manager is not in production, even in 4.0. — Mehdi> > PreservedAnalyses InstCombinePass::run(Function &F, > AnalysisManager<Function> &AM) { > auto &AC = AM.getResult<AssumptionAnalysis>(F); > auto &DT = AM.getResult<DominatorTreeAnalysis>(F); > auto &TLI = AM.getResult<TargetLibraryAnalysis>(F); > > auto *LI = AM.getCachedResult<LoopAnalysis>(F); > > // FIXME: The AliasAnalysis is not yet supported in the new pass manager > > > Thanks, > Welson > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170128/8b1be379/attachment.html>
Welson Sun via llvm-dev
2017-Jan-29 04:01 UTC
[llvm-dev] AliasAnalysis supported by the new Pass Manager in v3.9 ?
OK, the summary question is: in 3.9, how can I use Alias Analysis in a module pass? The background of the question is: I plan to upgrade from 3.5 to 3.9, and the biggest issue so far seems to be a module pass which requires alias analysis. The first approach I tried is using the createLegacyPMBasicAAResult followed by createLegacyPMAAResults as in lib/Transforms/IPO/Inliner.cpp. The weird problem I haven’t figured out yet is: this works fine if you just run the pass, but createLegacyPMBasicAAResult will crash with double free with gdb. I have tried using gdb on lib/Transforms/IPO/Inliner.cpp, and that worked fine. My pass is a shared library (.so) and loaded by opt, not sure if that is related. Or maybe related to how the pass is compiled? Will definitely keep digging. The second and cleaner approach should be using the new pass manager, but as I mentioned in the previous email, based on the FIXME in lib/Transforms/InstCombine/InstructionCombining.cpp code, the alias analysis seems to be not yet supported in the new pass manager. That’s why I asked the question to confirm in the first email. Thanks, Welson On Jan 28, 2017, 11:59 AM -0800, Mehdi Amini <mehdi.amini at apple.com>, wrote:> > > On Jan 28, 2017, at 6:41 AM, Welson Sun via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > Looking at the InstructionCombining.cpp code: > > What is the question? > > Please also note that the new pass manager is not in production, even in 4.0. > > — > Mehdi > > > > > > PreservedAnalyses InstCombinePass::run(Function &F, > > AnalysisManager<Function> &AM) { > > auto &AC = AM.getResult<AssumptionAnalysis>(F); > > auto &DT = AM.getResult<DominatorTreeAnalysis>(F); > > auto &TLI = AM.getResult<TargetLibraryAnalysis>(F); > > > > auto *LI = AM.getCachedResult<LoopAnalysis>(F); > > > > // FIXME: The AliasAnalysis is not yet supported in the new pass manager > > > > > > Thanks, > > Welson > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170128/6168815a/attachment.html>