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

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 16:10:36 PDT 2016


chandlerc marked 2 inline comments as done.

================
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.
----------------
silvas wrote:
> 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.
Because if there are extra arguments to the run method, there might be extra arguments to the getResult method, and we can't guess effectively how to map from one set of extra arguments to the other. Instead of trying, we just only provide the specialization for where there are no extra arguments at either level. CGSCC stuff has to provide its own specialization to handle the correct mapping from run-level extra arguments to getResult-level extra arguments.

(Comment updated)


http://reviews.llvm.org/D21462





More information about the llvm-commits mailing list