diff options
author | Fedor Sergeev <fedor.sergeev@azul.com> | 2018-03-27 16:57:20 +0000 |
---|---|---|
committer | Fedor Sergeev <fedor.sergeev@azul.com> | 2018-03-27 16:57:20 +0000 |
commit | 98014e433fe10d5a72ee1f5fbb29363ceb1533eb (patch) | |
tree | c9b767150b955d5fd7c44e52bd38d0980e7cd8f1 /llvm/lib/Analysis | |
parent | c205d8cc8dcce3d9f47f9d78c03eed7820d265e9 (diff) | |
download | bcm5719-llvm-98014e433fe10d5a72ee1f5fbb29363ceb1533eb.tar.gz bcm5719-llvm-98014e433fe10d5a72ee1f5fbb29363ceb1533eb.zip |
[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
llvm-svn: 328637
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/CallGraphSCCPass.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/RegionPass.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp index a2dda58a6a2..b1b3b79b407 100644 --- a/llvm/lib/Analysis/CallGraphSCCPass.cpp +++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp @@ -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); } diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index 0fb15df3efd..e39dc2070a3 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -357,7 +357,7 @@ bool LoopPass::skipLoop(const Loop *L) const { return false; // Check the opt bisect limit. LLVMContext &Context = F->getContext(); - if (!Context.getOptBisect().shouldRunPass(this, *L)) + if (!Context.getOptPassGate().shouldRunPass(this, *L)) return true; // Check for the OptimizeNone attribute. if (F->hasFnAttribute(Attribute::OptimizeNone)) { diff --git a/llvm/lib/Analysis/RegionPass.cpp b/llvm/lib/Analysis/RegionPass.cpp index c5d71b25e02..00282db8431 100644 --- a/llvm/lib/Analysis/RegionPass.cpp +++ b/llvm/lib/Analysis/RegionPass.cpp @@ -283,7 +283,7 @@ Pass *RegionPass::createPrinterPass(raw_ostream &O, bool RegionPass::skipRegion(Region &R) const { Function &F = *R.getEntry()->getParent(); - if (!F.getContext().getOptBisect().shouldRunPass(this, R)) + if (!F.getContext().getOptPassGate().shouldRunPass(this, R)) return true; if (F.hasFnAttribute(Attribute::OptimizeNone)) { |