[PATCH] D33464: [PM][WIP] Enable out-of-tree registration of passes with the new PassBuilder

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 15:28:45 PDT 2017


philip.pfaffe added inline comments.


================
Comment at: include/llvm/Passes/PassBuilder.h:371-385
+  void registerModuleOptimizerEarlyEPCallback(
+      const std::function<void(ModulePassManager &, OptimizationLevel)> &C) {
+    ModuleOptimizerEarlyEPCallbacks.push_back(C);
+  }
+
+  /// \brief Register a callback for a default optimizer pipeline extension
+  /// point
----------------
chandlerc wrote:
> I think we should drop both of these "early" extension points and the "last" extension point.
> 
> In the new PM, it is trivial to nest a pass manager, allowing users to easily run passes both before and after the pipeline. This should reduce the number of extension points we have to carry and it removes a semantic complication with the "last" extension point. If we really can't get any of the users of these ported over, we can add them back, but I'd like to be somewhat lazy here and work to address these use cases with nesting and wrapping as long as possible.
I'm not entirely convinced about this. I expect most users of the callbacks won't have access to the outermost PassManagers, so nesting will not be easily possible.


https://reviews.llvm.org/D33464





More information about the llvm-commits mailing list