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

Chandler Carruth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 12 16:43:09 PDT 2020


chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.

LGTM other than two nits here, this is really awesome!



================
Comment at: llvm/include/llvm/Analysis/CGSCCPassManager.h:856-858
+        auto *ResultFAMCP =
+            &CGAM.getResult<FunctionAnalysisManagerCGSCCProxy>(*C, CG);
+        ResultFAMCP->updateFAM(FAM);
----------------
asbirlea wrote:
> chandlerc wrote:
> > Check that it doesn't hit an assert failure, but I think you can remove this one.
> Removing this hits the assertion.
Dunno what I was thinking. Of course it does.

Anyways, skip the variable and just update the result directly?


================
Comment at: llvm/include/llvm/Analysis/CGSCCPassManager.h:908
+            // result.
+            ResultFAMCP =
+                &CGAM.getResult<FunctionAnalysisManagerCGSCCProxy>(*C, CG);
----------------
Similar to above, skip the variable?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72893





More information about the cfe-commits mailing list