[PATCH] D63378: [ORC] WIP Speculative compilation

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 12:05:34 PDT 2019


lhames added a comment.

This is looking good. I think it would be nice to have an example QueryAnalysis implementation to demonstrate how that is supposed to work.



================
Comment at: include/llvm/ExecutionEngine/Orc/Speculation.h:144-151
+  template <
+      typename AnalysisTy,
+      typename std::enable_if<
+          std::is_base_of<AnalysisInfoMixin<AnalysisTy>, AnalysisTy>::value,
+          bool>::type = true>
+  void registerAnalysis() {
+    FAM.registerPass([]() { return AnalysisTy(); });
----------------
One minor observation: I think that adding the ability to configure the pass pipeline here provides more degrees of freedom than necessary. If the aim is to simplify the QueryAnalysis by providing a preconfigured pass pipeline then the IRSpeculationLayer should configure that pipeline (and expose no registration mechanism). If the aim is for the pipeline to remain configurable (which seems like a good idea) then you can remove the PassBuilder and FunctionPassManager from the layer entirely (simplifying the layer implementation) and have the QueryAnalysis capture them when it is created.

Note that this is just polish if you have time. I would not let it block your progress on real experiments.


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

https://reviews.llvm.org/D63378





More information about the llvm-commits mailing list