[PATCH] D113947: [NewPM] Add option to prevent rerunning function pipeline on functions in CGSCC adaptor

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 16 12:16:38 PST 2021


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

LGTM



================
Comment at: llvm/lib/Analysis/CGSCCPassManager.cpp:21
 #include "llvm/IR/Instruction.h"
+#include "llvm/IR/PassInstrumentation.h"
 #include "llvm/IR/PassManager.h"
----------------
Why is this include needed?


================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:752
+    MIWP.addLateModulePass(createModuleToFunctionPassAdaptor(
+        InvalidateAnalysisPass<ShouldNotRunFunctionPassesAnalysis>()));
+
----------------
The layering here isn't great, in that the analysis is created and checked in the CGSCC pass manager, while the invalidation has to happen explicitly in the pipeline. Unfortunately I don't have a great suggestion on how to do this better, as we have the DevirtSCC pass wrapper sitting in between.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113947



More information about the llvm-commits mailing list