Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

The last use was removed in:

commit fa6ea7a
Author: Arthur Eubanks [email protected]
Date: Mon Mar 20 11:18:35 2023 -0700

The last use was removed in:

  commit fa6ea7a
  Author: Arthur Eubanks <[email protected]>
  Date:   Mon Mar 20 11:18:35 2023 -0700
@llvmbot llvmbot added llvm:analysis Includes value tracking, cost tables and constant folding llvm:transforms labels Feb 16, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 16, 2025

@llvm/pr-subscribers-llvm-transforms

@llvm/pr-subscribers-llvm-analysis

Author: Kazu Hirata (kazutakahirata)

Changes

The last use was removed in:

commit fa6ea7a
Author: Arthur Eubanks <[email protected]>
Date: Mon Mar 20 11:18:35 2023 -0700


Full diff: https://github.com/llvm/llvm-project/pull/127412.diff

4 Files Affected:

  • (modified) llvm/docs/OptBisect.rst (-1)
  • (modified) llvm/include/llvm/Analysis/CallGraphSCCPass.h (-5)
  • (modified) llvm/lib/Analysis/CallGraphSCCPass.cpp (-22)
  • (modified) llvm/lib/Transforms/IPO/AlwaysInliner.cpp (+1-1)
diff --git a/llvm/docs/OptBisect.rst b/llvm/docs/OptBisect.rst
index 809f54883e5a9..0e4d31acbe71e 100644
--- a/llvm/docs/OptBisect.rst
+++ b/llvm/docs/OptBisect.rst
@@ -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);
 
diff --git a/llvm/include/llvm/Analysis/CallGraphSCCPass.h b/llvm/include/llvm/Analysis/CallGraphSCCPass.h
index d0d81605436ea..e8714bae8f4d9 100644
--- a/llvm/include/llvm/Analysis/CallGraphSCCPass.h
+++ b/llvm/include/llvm/Analysis/CallGraphSCCPass.h
@@ -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.
diff --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp
index 7caf814cdb2d7..441f0c5d2f34b 100644
--- a/llvm/lib/Analysis/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp
@@ -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,
diff --git a/llvm/lib/Transforms/IPO/AlwaysInliner.cpp b/llvm/lib/Transforms/IPO/AlwaysInliner.cpp
index 20fc630a74a86..921fe8c18aa72 100644
--- a/llvm/lib/Transforms/IPO/AlwaysInliner.cpp
+++ b/llvm/lib/Transforms/IPO/AlwaysInliner.cpp
@@ -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();

@kazutakahirata kazutakahirata merged commit 5d4eb08 into llvm:main Feb 18, 2025
10 of 12 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_remove_llvm_Analysis_skipSCC branch February 18, 2025 17:59
wldfngrs pushed a commit to wldfngrs/llvm-project that referenced this pull request Feb 19, 2025
The last use was removed in:

  commit fa6ea7a
  Author: Arthur Eubanks <[email protected]>
  Date:   Mon Mar 20 11:18:35 2023 -0700
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:analysis Includes value tracking, cost tables and constant folding llvm:transforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants