summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/CallGraphSCCPass.cpp1
-rw-r--r--llvm/lib/Analysis/LoopInfo.cpp6
-rw-r--r--llvm/lib/Analysis/LoopPass.cpp1
-rw-r--r--llvm/lib/Analysis/RegionPass.cpp1
-rw-r--r--llvm/lib/CodeGen/MachineDominators.cpp2
-rw-r--r--llvm/lib/CodeGen/MachineFunctionPass.cpp4
-rw-r--r--llvm/lib/IR/LegacyPassManager.cpp18
-rw-r--r--llvm/lib/IR/Pass.cpp7
8 files changed, 9 insertions, 31 deletions
diff --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp
index 290fd34cff5..9cef7814415 100644
--- a/llvm/lib/Analysis/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp
@@ -414,7 +414,6 @@ bool CGPassManager::RunAllPassesOnSCC(CallGraphSCC &CurSCC, CallGraph &CG,
initializeAnalysisImpl(P);
// Actually run this pass on the current SCC.
- P->setExecuted(true);
Changed |= RunPassOnSCC(P, CurSCC, CG,
CallGraphUpToDate, DevirtualizedCall);
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index fb05e60e57d..714e0d5173f 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -731,10 +731,8 @@ void LoopInfoWrapperPass::verifyAnalysis() const {
// checking by default, LoopPass has been taught to call verifyLoop manually
// during loop pass sequences.
if (VerifyLoopInfo) {
- if (auto *Analysis = getAnalysisIfAvailable<DominatorTreeWrapperPass>()) {
- auto &DT = Analysis->getDomTree();
- LI.verify(DT);
- }
+ auto &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
+ LI.verify(DT);
}
}
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index d3e697e5c61..3f4a0794215 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -198,7 +198,6 @@ bool LPPassManager::runOnFunction(Function &F) {
PassManagerPrettyStackEntry X(P, *CurrentLoop->getHeader());
TimeRegion PassTimer(getPassTimer(P));
- P->setExecuted(true);
Changed |= P->runOnLoop(CurrentLoop, *this);
}
LoopWasDeleted = CurrentLoop->isInvalid();
diff --git a/llvm/lib/Analysis/RegionPass.cpp b/llvm/lib/Analysis/RegionPass.cpp
index 1c1e6210c64..7358aa6810a 100644
--- a/llvm/lib/Analysis/RegionPass.cpp
+++ b/llvm/lib/Analysis/RegionPass.cpp
@@ -94,7 +94,6 @@ bool RGPassManager::runOnFunction(Function &F) {
PassManagerPrettyStackEntry X(P, *CurrentRegion->getEntry());
TimeRegion PassTimer(getPassTimer(P));
- P->setExecuted(true);
Changed |= P->runOnRegion(CurrentRegion, *this);
}
diff --git a/llvm/lib/CodeGen/MachineDominators.cpp b/llvm/lib/CodeGen/MachineDominators.cpp
index a548480044e..303a6a9263b 100644
--- a/llvm/lib/CodeGen/MachineDominators.cpp
+++ b/llvm/lib/CodeGen/MachineDominators.cpp
@@ -69,7 +69,7 @@ void MachineDominatorTree::releaseMemory() {
}
void MachineDominatorTree::verifyAnalysis() const {
- if (VerifyMachineDomInfo && isExecuted())
+ if (VerifyMachineDomInfo)
verifyDomTree();
}
diff --git a/llvm/lib/CodeGen/MachineFunctionPass.cpp b/llvm/lib/CodeGen/MachineFunctionPass.cpp
index a7ece36a1e5..2265676ff8b 100644
--- a/llvm/lib/CodeGen/MachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/MachineFunctionPass.cpp
@@ -38,10 +38,8 @@ Pass *MachineFunctionPass::createPrinterPass(raw_ostream &O,
bool MachineFunctionPass::runOnFunction(Function &F) {
// Do not codegen any 'available_externally' functions at all, they have
// definitions outside the translation unit.
- if (F.hasAvailableExternallyLinkage()) {
- setExecuted(false);
+ if (F.hasAvailableExternallyLinkage())
return false;
- }
MachineModuleInfo &MMI = getAnalysis<MachineModuleInfo>();
MachineFunction &MF = MMI.getMachineFunction(F);
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index 0b2c40b742a..628a67bd639 100644
--- a/llvm/lib/IR/LegacyPassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -955,9 +955,6 @@ void PMDataManager::freePass(Pass *P, StringRef Msg,
AvailableAnalysis.erase(Pos);
}
}
-
- if (!P->getAsImmutablePass())
- P->setExecuted(false);
}
/// Add pass P into the PassVector. Update
@@ -1296,7 +1293,6 @@ bool BBPassManager::runOnFunction(Function &F) {
PassManagerPrettyStackEntry X(BP, *I);
TimeRegion PassTimer(getPassTimer(BP));
- BP->setExecuted(true);
LocalChanged |= BP->runOnBasicBlock(*I);
}
@@ -1463,9 +1459,7 @@ bool FunctionPassManagerImpl::run(Function &F) {
initializeAllAnalysisInfo();
for (unsigned Index = 0; Index < getNumContainedManagers(); ++Index) {
- FPPassManager *P = getContainedManager(Index);
- P->setExecuted(true);
- Changed |= P->runOnFunction(F);
+ Changed |= getContainedManager(Index)->runOnFunction(F);
F.getContext().yield();
}
@@ -1516,7 +1510,6 @@ bool FPPassManager::runOnFunction(Function &F) {
PassManagerPrettyStackEntry X(FP, F);
TimeRegion PassTimer(getPassTimer(FP));
- FP->setExecuted(true);
LocalChanged |= FP->runOnFunction(F);
}
@@ -1537,10 +1530,8 @@ bool FPPassManager::runOnFunction(Function &F) {
bool FPPassManager::runOnModule(Module &M) {
bool Changed = false;
- for (Function &F : M) {
- setExecuted(true);
+ for (Function &F : M)
Changed |= runOnFunction(F);
- }
return Changed;
}
@@ -1596,7 +1587,6 @@ MPPassManager::runOnModule(Module &M) {
PassManagerPrettyStackEntry X(MP, M);
TimeRegion PassTimer(getPassTimer(MP));
- MP->setExecuted(true);
LocalChanged |= MP->runOnModule(M);
}
@@ -1700,9 +1690,7 @@ bool PassManagerImpl::run(Module &M) {
initializeAllAnalysisInfo();
for (unsigned Index = 0; Index < getNumContainedManagers(); ++Index) {
- MPPassManager *P = getContainedManager(Index);
- P->setExecuted(true);
- Changed |= P->runOnModule(M);
+ Changed |= getContainedManager(Index)->runOnModule(M);
M.getContext().yield();
}
diff --git a/llvm/lib/IR/Pass.cpp b/llvm/lib/IR/Pass.cpp
index 6e22c1d4641..a42945ef3ff 100644
--- a/llvm/lib/IR/Pass.cpp
+++ b/llvm/lib/IR/Pass.cpp
@@ -146,16 +146,13 @@ PassManagerType FunctionPass::getPotentialPassManagerType() const {
return PMT_FunctionPassManager;
}
-bool FunctionPass::skipFunction(const Function &F) {
- if (!F.getContext().getOptBisect().shouldRunPass(this, F)) {
- setExecuted(false);
+bool FunctionPass::skipFunction(const Function &F) const {
+ if (!F.getContext().getOptBisect().shouldRunPass(this, F))
return true;
- }
if (F.hasFnAttribute(Attribute::OptimizeNone)) {
DEBUG(dbgs() << "Skipping pass '" << getPassName() << "' on function "
<< F.getName() << "\n");
- setExecuted(false);
return true;
}
return false;
OpenPOWER on IntegriCloud