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

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 12:35:53 PDT 2019


asbirlea created this revision.
Herald added subscribers: george.burgess.iv, jlebar, nhaehnle, jvesely, arsenm, sanjoy.
Herald added a project: LLVM.

Adding contained caching to BasicAA and potential other AAs as well.
[DO NOT MERGE]

Advantage over the first prototype is pulling the caches inside BasicAA::alias to AA results, meaning the getModRefInfo call benefits from the IsCapturedCache as well when in "batch mode".

All AAResultBase implementations add the QueryInfo member to all APIs. AAResults APIs maintain wrapper APIs such that all alias()/getModRefInfo call sites are unchanged.

All users of AA rely on the AliasAnalysis type, a typedef of AAResults. Introducing a BatchAAResults type would need to be interchangable with AAResults (a new class wrapping either a SingleAAResults or BatchAAResults, or both types implementing the same interface.).
Current patch updates the AAResults instance in place, setting it in batch mode, or "out of" batch mode.

Having temporary instances of some BatchAAResults will need to also account for users storing that temporary. The ClobberWalker currently stores a reference to AA when MemorySSA is built, so using a temporary AA and replacing it after the build, will need to also update the reference in the walker.
(see comment in MemorySSA.cpp)


Repository:
  rL LLVM

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/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.190475.patch
Type: text/x-patch
Size: 66445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190313/bc586410/attachment.bin>


More information about the llvm-commits mailing list