[PATCH] D72893: [NewPassManager] Add assertions when getting statefull cached analysis.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 17:00:34 PST 2020


asbirlea created this revision.
asbirlea added a reviewer: chandlerc.
Herald added subscribers: zzheng, hiraditya, eraman, mehdi_amini.
Herald added a project: LLVM.
asbirlea added a parent revision: D72891: Compute ORE, BPI, BFI in Loop passes..
asbirlea added parent revisions: D72817: [LazyCallGraph] Add invalidate method., D72816: [CallGraph]  Add invalidate method., D72815: [BrachProbablityInfo] Add invalidate method., D72818: [GlobalsModRef] Add invalidate method.

Analyses that are statefull should not be retrieved through a proxy from
an outer IR unit, as these analyses are only invalidated at the end of
the inner IR unit manager.
This patch disallows getting the outer manager and provides an API to
get a cached analysis through the proxy. If the analysis is not
stateless, the call to getCachedResult will assert.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72893

Files:
  llvm/include/llvm/Analysis/AliasAnalysis.h
  llvm/include/llvm/IR/PassManager.h
  llvm/lib/Analysis/CGSCCPassManager.cpp
  llvm/lib/Transforms/IPO/Inliner.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
  llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
  llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
  llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
  llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
  llvm/unittests/IR/PassManagerTest.cpp
  llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72893.238667.patch
Type: text/x-patch
Size: 33814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200117/0a272e36/attachment.bin>


More information about the llvm-commits mailing list