[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.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 19:37:43 PST 2016


chandlerc added a comment.

In http://reviews.llvm.org/D17259#354300, @reames wrote:

> Have to admit, I don't really understand the motivation for this.  Having said that, I don't see anything obviously wrong, and I don't want you blocked on this, so LGTM.


Well, I think its important that the motivation makes sense. The key thing is that we want command line tools like 'opt' to be able to customize the AAManager (potentially using the PassBuilder to do so!), and use that customized AAManager instead of whatever the default would be while still getting the default registration of every other analysis. The mechanism I ended up with was to allow callers of registerFunctionAnalyses to pre-register analyses if they desire.


================
Comment at: lib/Passes/PassBuilder.cpp:224
@@ +223,3 @@
+#include "PassRegistry.def"
+
+  return false;
----------------
reames wrote:
> Add an #undef after.
The .def file should be #undefing everything it uses. I'll make sure I got that right (I think I didn't).


http://reviews.llvm.org/D17259





More information about the llvm-commits mailing list