Skip to content

[Analysis] Remove skipSCC #127412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion llvm/docs/OptBisect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 0 additions & 5 deletions llvm/include/llvm/Analysis/CallGraphSCCPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ class CallGraphSCCPass : public Pass {
/// 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.
Expand Down
22 changes: 0 additions & 22 deletions llvm/lib/Analysis/CallGraphSCCPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/IPO/AlwaysInliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down