[PATCH] D100912: [docs][NewPM] Add section on analyses

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 19:53:04 PDT 2021


mtrofin added inline comments.


================
Comment at: llvm/docs/NewPassManager.rst:239
+
+An analysis should implement ``invalidate()`` like below, at least for simple
+cases:
----------------
aeubanks wrote:
> mtrofin wrote:
> > but for simple cases that's not necessary, the default impl does that, no?
> There's no default implementation?
> Each analysis's `Result` type needs to implement `invalidate()`. Although that does bring up a good point that it's specifically the result that implements it, not the analysis interface. Will clarify.
See PassManagerInternal.h:172 - there's a wrapper to the analysis result concept. Result::invalidate doesn't need to be implemented unless it does something non-trivial.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100912



More information about the llvm-commits mailing list