[NFC] OptPassGate extracted from OptBisect

Summary:
This is an NFC refactoring of the OptBisect class to split it into an optional pass gate interface used by LLVMContext and the Optional Pass Bisector (OptBisect) used for debugging of optional passes.

This refactoring is needed for D44464, which introduces setOptPassGate() method to allow implementations other than OptBisect.

Patch by Yevgeny Rouban.

Reviewers: andrew.w.kaylor, fedor.sergeev, vsk, dberlin, Eugene.Zelenko, reames, skatkov
Reviewed By: fedor.sergeev
Differential Revision: https://reviews.llvm.org/D44821

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328637 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Fedor Sergeev
2018-03-27 16:57:20 +00:00
parent 9273bb3570
commit 558f76fb1d
10 changed files with 73 additions and 37 deletions
+1 -1
View File
@@ -648,7 +648,7 @@ Pass *CallGraphSCCPass::createPrinterPass(raw_ostream &OS,
bool CallGraphSCCPass::skipSCC(CallGraphSCC &SCC) const {
return !SCC.getCallGraph().getModule()
.getContext()
.getOptBisect()
.getOptPassGate()
.shouldRunPass(this, SCC);
}