[PATCH] Add a callback to FunctionPass to enable skipping execution on a per-function basis
Eric Christopher
echristo at gmail.com
Tue May 26 15:05:22 PDT 2015
Yep. This is where I was going with it.
Thanks for the work and your patience!
-eric
================
Comment at: lib/CodeGen/Passes.cpp:295-312
@@ -294,2 +294,20 @@
}
+
+ // Add the passes after the pass P if there is any.
+ for (SmallVectorImpl<std::pair<AnalysisID, IdentifyingPassPtr> >::iterator
+ I = Impl->InsertedPasses.begin(),
+ E = Impl->InsertedPasses.end();
+ I != E; ++I) {
+ if ((*I).first == PassID) {
+ assert((*I).second.isValid() && "Illegal Pass ID!");
+ Pass *NP;
+ if ((*I).second.isInstance())
+ NP = (*I).second.getInstance();
+ else {
+ NP = Pass::createPass((*I).second.getID());
+ assert(NP && "Pass ID not registered");
+ }
+ addPass(NP, false, false);
+ }
+ }
} else {
----------------
I'm probably missing something, but why move this code?
http://reviews.llvm.org/D8717
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list