[PATCH] D100519: [NFC][NewPM] Remove some AnalysisManager invalidate methods

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 14 20:04:18 PDT 2021


aeubanks added inline comments.


================
Comment at: llvm/include/llvm/IR/PassManager.h:867
-  /// it is in fact still valid.
-  template <typename PassT> void invalidate(IRUnitT &IR) {
-    assert(AnalysisPasses.count(PassT::ID()) &&
----------------
mtrofin wrote:
> so is there a way then to tell the FAM to delete an immutable analysis, or nothing uses that?
> 
> one possible scenario may be in the case the analysis occupies too much memory, and there's a good place to dispose of it. 
Immutable analyses are generally stateless so they should be fairly small.

There wouldn't be a way to tell the FAM to delete an immutable analysis, outside of clearing all analyses for some (invalidated) IR. But I think that should be fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100519



More information about the llvm-commits mailing list