[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.
Pete Cooper via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 15 12:30:52 PST 2016
pete added a subscriber: pete.
pete added a comment.
So i'm not against the lambda's if they are required, but I can't really see why we need them instead of say, a function pointer?
Eg, instead of
MAM.registerPass([&] { return FunctionAnalysisManagerModuleProxy(FAM); });
do
MAM.registerPass(&FunctionAnalysisManagerModuleProxy)
Also, looks like the lambda (or function pointer), is being used to make sure we don't construct a pass twice. Why not jus make that an error to register the same pass twice? Is that something we can say is a condition of using the new pass manager?
http://reviews.llvm.org/D17259
More information about the llvm-commits
mailing list