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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 05:01:17 PDT 2022


fhahn added inline comments.


================
Comment at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:766
 
+class LoopAccessInfoManager {
+  /// The cache.
----------------
asbirlea wrote:
> With this addition, could you drop the function pointer passed in all the passes and update the APIs to take `LAIs` instead? And call getInfo() internally when doing the processing on loops?
> 
> 
> I know it means more changes, but I think the cleanup makes sense (unless I'm missing something). Ok to do as follow up NFC.
I think this should be done D134609 and should help to make things a bit simpler in the code.


================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:2730
+      AM.getResult<DominatorTreeAnalysis>(F), AM.getResult<LoopAnalysis>(F),
+      AM.getCachedResult<TargetLibraryAnalysis>(F));
+}
----------------
aeubanks wrote:
> why cached?
The original intention was to preserve the legacy PM behavior, but looking at the code it makes more sense to require it always, to avoid surprising behavior.


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