Skip to content

[NFC][CGSCC] Remove RCWorklist from CGSCCUpdateResult #95448

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
merged 1 commit into from
Jun 24, 2024

Conversation

aeubanks
Copy link
Contributor

After #94815, this is only used within ModuleToPostOrderCGSCCPassAdaptor::run(), so keep it local to that function.

After llvm#94815, this is only used within ModuleToPostOrderCGSCCPassAdaptor::run(), so keep it local to that function.
@aeubanks aeubanks requested a review from alinas June 13, 2024 18:16
@llvmbot llvmbot added the llvm:analysis Includes value tracking, cost tables and constant folding label Jun 13, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 13, 2024

@llvm/pr-subscribers-llvm-analysis

Author: Arthur Eubanks (aeubanks)

Changes

After #94815, this is only used within ModuleToPostOrderCGSCCPassAdaptor::run(), so keep it local to that function.


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

2 Files Affected:

  • (modified) llvm/include/llvm/Analysis/CGSCCPassManager.h (-11)
  • (modified) llvm/lib/Analysis/CGSCCPassManager.cpp (+8-4)
diff --git a/llvm/include/llvm/Analysis/CGSCCPassManager.h b/llvm/include/llvm/Analysis/CGSCCPassManager.h
index b19d53621ac86..59974d146b56d 100644
--- a/llvm/include/llvm/Analysis/CGSCCPassManager.h
+++ b/llvm/include/llvm/Analysis/CGSCCPassManager.h
@@ -230,17 +230,6 @@ using ModuleAnalysisManagerCGSCCProxy =
 /// Passes which do not change the call graph structure in any way can just
 /// ignore this argument to their run method.
 struct CGSCCUpdateResult {
-  /// Worklist of the RefSCCs queued for processing.
-  ///
-  /// When a pass refines the graph and creates new RefSCCs or causes them to
-  /// have a different shape or set of component SCCs it should add the RefSCCs
-  /// to this worklist so that we visit them in the refined form.
-  ///
-  /// This worklist is in reverse post-order, as we pop off the back in order
-  /// to observe RefSCCs in post-order. When adding RefSCCs, clients should add
-  /// them in reverse post-order.
-  SmallPriorityWorklist<LazyCallGraph::RefSCC *, 1> &RCWorklist;
-
   /// Worklist of the SCCs queued for processing.
   ///
   /// When a pass refines the graph and creates new SCCs or causes them to have
diff --git a/llvm/lib/Analysis/CGSCCPassManager.cpp b/llvm/lib/Analysis/CGSCCPassManager.cpp
index 2ed1d98f80068..24b3c6eef1084 100644
--- a/llvm/lib/Analysis/CGSCCPassManager.cpp
+++ b/llvm/lib/Analysis/CGSCCPassManager.cpp
@@ -160,10 +160,14 @@ ModuleToPostOrderCGSCCPassAdaptor::run(Module &M, ModuleAnalysisManager &AM) {
 
   SmallVector<Function *, 4> DeadFunctions;
 
-  CGSCCUpdateResult UR = {
-      RCWorklist,           CWorklist,     InvalidRefSCCSet,
-      InvalidSCCSet,        nullptr,       PreservedAnalyses::all(),
-      InlinedInternalEdges, DeadFunctions, {}};
+  CGSCCUpdateResult UR = {CWorklist,
+                          InvalidRefSCCSet,
+                          InvalidSCCSet,
+                          nullptr,
+                          PreservedAnalyses::all(),
+                          InlinedInternalEdges,
+                          DeadFunctions,
+                          {}};
 
   // Request PassInstrumentation from analysis manager, will use it to run
   // instrumenting callbacks for the passes later.

@aeubanks aeubanks requested a review from zmodem June 21, 2024 04:24
Copy link
Collaborator

@zmodem zmodem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aeubanks aeubanks merged commit b312cbf into llvm:main Jun 24, 2024
9 checks passed
@aeubanks aeubanks deleted the rcworklist branch June 24, 2024 16:04
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
After llvm#94815, this is only used within
ModuleToPostOrderCGSCCPassAdaptor::run(), so keep it local to that
function.
anton-bannykh pushed a commit to Kotlin/llvm-project that referenced this pull request Aug 23, 2024
After llvm#94815, this is only used within
ModuleToPostOrderCGSCCPassAdaptor::run(), so keep it local to that
function.

(cherry picked from commit b312cbf)
anton-bannykh pushed a commit to Kotlin/llvm-project that referenced this pull request Aug 23, 2024
After llvm#94815, this is only used within
ModuleToPostOrderCGSCCPassAdaptor::run(), so keep it local to that
function.

(cherry picked from commit b312cbf)
anton-bannykh pushed a commit to Kotlin/llvm-project that referenced this pull request Aug 26, 2024
After llvm#94815, this is only used within
ModuleToPostOrderCGSCCPassAdaptor::run(), so keep it local to that
function.

(cherry picked from commit b312cbf)
anton-bannykh pushed a commit to Kotlin/llvm-project that referenced this pull request Aug 26, 2024
After llvm#94815, this is only used within
ModuleToPostOrderCGSCCPassAdaptor::run(), so keep it local to that
function.

(cherry picked from commit b312cbf)
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants