[PATCH] D134606: [LAA] Change to function analysis for new PM.

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 14:23:30 PDT 2022


aeubanks added a comment.

two thoughts:

IIUC the issue is that LoopVersioningLICM (a loop pass) is accessing other loops' analyses. a simpler fix would be to not go through the analysis manager just for LoopVersioningLICM and do the caching within the pass. that's basically what this patch does but isolated to LoopVersioningLICM

but perhaps there can be a more proper fix at the analysis manager level. I think (but am not 100% sure) there was the assumption that a loop pass cannot look at another loop's analysis (if we decide to go this route we should add checks). but if we allow loop passes to look at another loop's analysis, we should properly invalidate relevant loops in the pass manager. which loops' analyses does LoopVersioningLICM look at?



================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:2730
+      AM.getResult<DominatorTreeAnalysis>(F), AM.getResult<LoopAnalysis>(F),
+      AM.getCachedResult<TargetLibraryAnalysis>(F));
+}
----------------
why cached?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134606/new/

https://reviews.llvm.org/D134606



More information about the llvm-commits mailing list