[PATCH] D18576: Initial implementation of optimization bisect
Andy Kaylor via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 14 12:09:27 PDT 2016
andrew.w.kaylor added a comment.
The new pass manager design also presents a problem in terms of creating a single, simple check function that goes through the LLVMContext. Right now, I'm testing with the global singleton like this:
if (!getOptBisect().shouldRunPass(name(), &F))
return PreservedAnalyses::all();
Trying to move that into the context yields something like this:
if (!F.getContext().getOptBisect().shouldRunPass(name(), &F))
return PreservedAnalyses::all();
That's not terrible, but for loop passes it becomes this:
if (auto *F = L->getHeader()->getParent()) {
LLVMContext &Context = F->getContext();
if (!Context.getOptBisect().shouldRunPass(this, L))
return PreservedAnalyses::all();
}
I could provide global helper functions that perform this check, but that has the feel of false encapsulation.
Repository:
rL LLVM
http://reviews.llvm.org/D18576
More information about the llvm-commits
mailing list