[Analysis] Remove skipSCC (#127412)

The last use was removed in:

  commit fa6ea7a419
  Author: Arthur Eubanks <aeubanks@google.com>
  Date:   Mon Mar 20 11:18:35 2023 -0700
This commit is contained in:
Kazu Hirata
2025-02-18 09:59:12 -08:00
committed by GitHub
parent f66d97fe51
commit 5d4eb08379
4 changed files with 1 additions and 29 deletions

View File

@@ -157,7 +157,6 @@ to make this check uniform across all passes. These helper functions are:
.. code-block:: c++
bool ModulePass::skipModule(Module &M);
bool CallGraphSCCPass::skipSCC(CallGraphSCC &SCC);
bool FunctionPass::skipFunction(const Function &F);
bool LoopPass::skipLoop(const Loop *L);

View File

@@ -76,11 +76,6 @@ public:
/// the call graph. If the derived class implements this method, it should
/// always explicitly call the implementation here.
void getAnalysisUsage(AnalysisUsage &Info) const override;
protected:
/// Optional passes call this function to check whether the pass should be
/// skipped. This is the case when optimization bisect is over the limit.
bool skipSCC(CallGraphSCC &SCC) const;
};
/// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on.

View File

@@ -725,28 +725,6 @@ Pass *CallGraphSCCPass::createPrinterPass(raw_ostream &OS,
return new PrintCallGraphPass(Banner, OS);
}
static std::string getDescription(const CallGraphSCC &SCC) {
std::string Desc = "SCC (";
ListSeparator LS;
for (CallGraphNode *CGN : SCC) {
Desc += LS;
Function *F = CGN->getFunction();
if (F)
Desc += F->getName();
else
Desc += "<<null function>>";
}
Desc += ")";
return Desc;
}
bool CallGraphSCCPass::skipSCC(CallGraphSCC &SCC) const {
OptPassGate &Gate =
SCC.getCallGraph().getModule().getContext().getOptPassGate();
return Gate.isEnabled() &&
!Gate.shouldRunPass(this->getPassName(), getDescription(SCC));
}
char DummyCGSCCPass::ID = 0;
INITIALIZE_PASS(DummyCGSCCPass, "DummyCGSCCPass", "DummyCGSCCPass", false,

View File

@@ -126,7 +126,7 @@ struct AlwaysInlinerLegacyPass : public ModulePass {
initializeAlwaysInlinerLegacyPassPass(*PassRegistry::getPassRegistry());
}
/// Main run interface method. We override here to avoid calling skipSCC().
/// Main run interface method.
bool runOnModule(Module &M) override {
auto &PSI = getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();