leonardchan added inline comments.

================
Comment at: llvm/include/llvm/Passes/PassBuilder.h:597-598
   ///
   /// This extension point allows adding optimizations at the very end of the
   /// function optimization pipeline. A key difference between this and the
   /// legacy PassManager's OptimizerLast callback is that this extension point
----------------
Will need to change the wording on this if this doesn't handle function passes 
anymore.


================
Comment at: llvm/lib/Passes/PassBuilder.cpp:1078
 
+  for (auto &C : OptimizerLastEPCallbacks)
+    C(MPM, Level);
----------------
Would it be better to add another `SmallVector` and `register*Calback()` for 
modules in in `PassBuilder` that we could loop through here instead of changing 
how these extension points work?

I imagine it would still be meaningful in the future to be able to add function 
passes at the end of the function optimization pipeline.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80692



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to