[PATCH] D17259: [PM/AA] Teach the new pass manager to use pass-by-lambda for registering analysis passes, support pre-registering analyses, and use that to implement parsing and pre-registering a custom alias analysis pipeline.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 03:45:57 PST 2016


bkramer added a subscriber: bkramer.

================
Comment at: include/llvm/Passes/PassBuilder.h:101
@@ +100,3 @@
+  ///
+  /// The AA manager is set up such that the provide alias analyses are tried
+  /// in the order specified. See the \c AAManaager documentation for details
----------------
s/provide/&d/

================
Comment at: lib/Passes/PassBuilder.cpp:108
@@ -107,3 +107,3 @@
 #define MODULE_ANALYSIS(NAME, CREATE_PASS) \
-  MAM.registerPass(CREATE_PASS);
+  MAM.registerPass([&] { return CREATE_PASS; });
 #include "PassRegistry.def"
----------------
What's being captured by the lambda here?


http://reviews.llvm.org/D17259





More information about the llvm-commits mailing list