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

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 14 20:34:39 PDT 2021


mtrofin 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()) &&
----------------
aeubanks wrote:
> 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.
> Immutable analyses are generally stateless so they should be fairly small.
Profile info could be large, for instance.

> 
> 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.
We could rename instead the invalidate API to "clearResult"?



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