[llvm] [NFC][BP] Remove unused parameter from function (PR #86333)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 12:54:04 PDT 2024


https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/86333

Remove the unused parameter `RecDepth` from `runIterations()`.

>From 45eb80c0fed59a3a5694331b26741a3dfa77e2aa Mon Sep 17 00:00:00 2001
From: Ellis Hoag <ellis.sparky.hoag at gmail.com>
Date: Fri, 22 Mar 2024 12:52:14 -0700
Subject: [PATCH] [NFC][BP] Remove unused parameter from function Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
---
 llvm/include/llvm/Support/BalancedPartitioning.h | 5 ++---
 llvm/lib/Support/BalancedPartitioning.cpp        | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/llvm/include/llvm/Support/BalancedPartitioning.h b/llvm/include/llvm/Support/BalancedPartitioning.h
index 9738e742f7f1e9..539d157343fbe3 100644
--- a/llvm/include/llvm/Support/BalancedPartitioning.h
+++ b/llvm/include/llvm/Support/BalancedPartitioning.h
@@ -142,9 +142,8 @@ class BalancedPartitioning {
               std::optional<BPThreadPool> &TP) const;
 
   /// Run bisection iterations
-  void runIterations(const FunctionNodeRange Nodes, unsigned RecDepth,
-                     unsigned LeftBucket, unsigned RightBucket,
-                     std::mt19937 &RNG) const;
+  void runIterations(const FunctionNodeRange Nodes, unsigned LeftBucket,
+                     unsigned RightBucket, std::mt19937 &RNG) const;
 
   /// Run a bisection iteration to improve the optimization goal
   /// \returns the total number of moved FunctionNodes
diff --git a/llvm/lib/Support/BalancedPartitioning.cpp b/llvm/lib/Support/BalancedPartitioning.cpp
index f4254b50d26c91..141f0034a23f04 100644
--- a/llvm/lib/Support/BalancedPartitioning.cpp
+++ b/llvm/lib/Support/BalancedPartitioning.cpp
@@ -136,7 +136,7 @@ void BalancedPartitioning::bisect(const FunctionNodeRange Nodes,
   // Split into two and assign to the left and right buckets
   split(Nodes, LeftBucket);
 
-  runIterations(Nodes, RecDepth, LeftBucket, RightBucket, RNG);
+  runIterations(Nodes, LeftBucket, RightBucket, RNG);
 
   // Split nodes wrt the resulting buckets
   auto NodesMid =
@@ -163,7 +163,7 @@ void BalancedPartitioning::bisect(const FunctionNodeRange Nodes,
 }
 
 void BalancedPartitioning::runIterations(const FunctionNodeRange Nodes,
-                                         unsigned RecDepth, unsigned LeftBucket,
+                                         unsigned LeftBucket,
                                          unsigned RightBucket,
                                          std::mt19937 &RNG) const {
   unsigned NumNodes = std::distance(Nodes.begin(), Nodes.end());



More information about the llvm-commits mailing list