[PATCH] D85109: [NewPM] Clear abandoned analyses set when preserveSet is called

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 16:48:22 PDT 2020


asbirlea requested changes to this revision.
asbirlea added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/include/llvm/IR/PassManager.h:192
+  /// Regular passes should not call this.
+  /// FIXME: rename this to `preserveSetAndClearAbandonedAnalyses`?
   template <typename AnalysisSetT> void preserveSet() {
----------------
asbirlea wrote:
> I'd be fine with renaming this with this mouthful name. Not just because it's more informative, but it's more likely to remain internally used, or easy to catch if it's not. I don't see how we can assert/enforce this easily.
Actually this doesn't look quite right. It's clearing all analyses, for all IR units.
After talking with chandlerc@, a better approach would be clearing in `invalidate`. I'm looking into the alternative approach.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85109



More information about the llvm-commits mailing list