[PATCH] D59315: [AliasAnalysis] Second prototype to cache BasicAA / anyAA state.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 23:50:11 PDT 2019


asbirlea updated this revision to Diff 190786.
asbirlea added a comment.
Herald added a subscriber: jfb.

Here goes, this is pretty big change based on Chandler's feedback.

- Created BatchAAResults as a wrapper to AAResults. Keeps the AAResults instance and a QueryInfo instantiated to batch mode.
- Add all the wrapper APIs needs to wrap/hide the query argument in AAResults (lots more needed than the first iteration).
- All MemorySSA walkers are now templated on the AA used (AliasAnalysis=AAResults or BatchAAResults).
- In MemorySSA, at build time, we optimize uses. Create a local walker (lives only as long as OptimizeUses does) using BatchAAResults.
- All Walkers have an internal AA and only use that now, never the AA in MemorySSA. The Walkers receive the AA they will use when built.
- The walker we use for queries after the build is instantiated on AliasAnalysis and can be built when building MemorySSA or not (commented out currently).
- In MemorySSA all static methods doing walking are now templated on AliasAnalysisType if they are used both during build and after. If used only during built method now only takes a BatchAAResults. If used only after build, method takes an AliasAnalysis.

Not done yet:

- Did not teach AliasSetTracker to use BatchAAResults.
- Did not remove setAAToBatch and setAAToSingle yet (called in the AST user (LICM)). Their usage is removed for building MemorySSA.

All changes related to AA and MemorySSA should be done. Sending for feedback while I make the remaining changes in LICM/AliasSetTracker. I can also split these out.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59315

Files:
  include/llvm/Analysis/AliasAnalysis.h
  include/llvm/Analysis/BasicAliasAnalysis.h
  include/llvm/Analysis/CFLAndersAliasAnalysis.h
  include/llvm/Analysis/CFLSteensAliasAnalysis.h
  include/llvm/Analysis/GlobalsModRef.h
  include/llvm/Analysis/MemorySSA.h
  include/llvm/Analysis/ObjCARCAliasAnalysis.h
  include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h
  include/llvm/Analysis/ScopedNoAliasAA.h
  include/llvm/Analysis/TypeBasedAliasAnalysis.h
  lib/Analysis/AliasAnalysis.cpp
  lib/Analysis/BasicAliasAnalysis.cpp
  lib/Analysis/CFLAndersAliasAnalysis.cpp
  lib/Analysis/GlobalsModRef.cpp
  lib/Analysis/MemorySSA.cpp
  lib/Analysis/ObjCARCAliasAnalysis.cpp
  lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
  lib/Analysis/ScopedNoAliasAA.cpp
  lib/Analysis/TypeBasedAliasAnalysis.cpp
  lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
  lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
  lib/Transforms/Scalar/LICM.cpp
  unittests/Analysis/AliasAnalysisTest.cpp
  unittests/Analysis/BasicAliasAnalysisTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59315.190786.patch
Type: text/x-patch
Size: 94275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190315/e09fbc43/attachment-0001.bin>


More information about the llvm-commits mailing list