Skip to content

Commit 5d4eb08

Browse files
[Analysis] Remove skipSCC (#127412)
The last use was removed in: commit fa6ea7a Author: Arthur Eubanks <[email protected]> Date: Mon Mar 20 11:18:35 2023 -0700
1 parent f66d97f commit 5d4eb08

File tree

4 files changed

+1
-29
lines changed

4 files changed

+1
-29
lines changed

llvm/docs/OptBisect.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ to make this check uniform across all passes. These helper functions are:
157157
.. code-block:: c++
158158

159159
bool ModulePass::skipModule(Module &M);
160-
bool CallGraphSCCPass::skipSCC(CallGraphSCC &SCC);
161160
bool FunctionPass::skipFunction(const Function &F);
162161
bool LoopPass::skipLoop(const Loop *L);
163162

llvm/include/llvm/Analysis/CallGraphSCCPass.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ class CallGraphSCCPass : public Pass {
7676
/// the call graph. If the derived class implements this method, it should
7777
/// always explicitly call the implementation here.
7878
void getAnalysisUsage(AnalysisUsage &Info) const override;
79-
80-
protected:
81-
/// Optional passes call this function to check whether the pass should be
82-
/// skipped. This is the case when optimization bisect is over the limit.
83-
bool skipSCC(CallGraphSCC &SCC) const;
8479
};
8580

8681
/// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on.

llvm/lib/Analysis/CallGraphSCCPass.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -725,28 +725,6 @@ Pass *CallGraphSCCPass::createPrinterPass(raw_ostream &OS,
725725
return new PrintCallGraphPass(Banner, OS);
726726
}
727727

728-
static std::string getDescription(const CallGraphSCC &SCC) {
729-
std::string Desc = "SCC (";
730-
ListSeparator LS;
731-
for (CallGraphNode *CGN : SCC) {
732-
Desc += LS;
733-
Function *F = CGN->getFunction();
734-
if (F)
735-
Desc += F->getName();
736-
else
737-
Desc += "<<null function>>";
738-
}
739-
Desc += ")";
740-
return Desc;
741-
}
742-
743-
bool CallGraphSCCPass::skipSCC(CallGraphSCC &SCC) const {
744-
OptPassGate &Gate =
745-
SCC.getCallGraph().getModule().getContext().getOptPassGate();
746-
return Gate.isEnabled() &&
747-
!Gate.shouldRunPass(this->getPassName(), getDescription(SCC));
748-
}
749-
750728
char DummyCGSCCPass::ID = 0;
751729

752730
INITIALIZE_PASS(DummyCGSCCPass, "DummyCGSCCPass", "DummyCGSCCPass", false,

llvm/lib/Transforms/IPO/AlwaysInliner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct AlwaysInlinerLegacyPass : public ModulePass {
126126
initializeAlwaysInlinerLegacyPassPass(*PassRegistry::getPassRegistry());
127127
}
128128

129-
/// Main run interface method. We override here to avoid calling skipSCC().
129+
/// Main run interface method.
130130
bool runOnModule(Module &M) override {
131131

132132
auto &PSI = getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();

0 commit comments

Comments
 (0)