[PATCH] D21462: [PM] Make the the new pass manageg support fully generic extra arguments to run methods, both for transform passes and analysis passes.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 01:23:31 PDT 2016


silvas added a subscriber: silvas.
silvas added a comment.

I was initially a bit concerned with the variadics (instead it may be simpler to just group the extra stuff into the IRUnitT when necessary), but this doesn't seem too bad.


================
Comment at: include/llvm/IR/PassManager.h:965
@@ +964,3 @@
+
+/// A specialization of the RequireAnalysisPass for generic IR unit analysis
+/// managers and pass managers that have no extra arguments.
----------------
Why do you need a partial specialization here? Shouldn't it just work if you propagate the variadics into the `run` method too? If not, a comment would be appreciated.

================
Comment at: unittests/IR/PassManagerTest.cpp:382
@@ +381,3 @@
+  PM.addPass(CustomizedPass::CustomizedPass(
+      [&Result](CustomizedAnalysis::Result &R, int &O) { O += R.I; }));
+
----------------
Nit: The capture here seems to be a leftover.


http://reviews.llvm.org/D21462





More information about the llvm-commits mailing list