[llvm] 9d1fbbd - [SROA][NFC] Remove Unused Parameter in `promoteAllocas()` (#128382)

via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 23 08:17:47 PST 2025


Author: Veera
Date: 2025-02-23T11:17:43-05:00
New Revision: 9d1fbbd2b9a00248eb8ea578c4047af4ec4da990

URL: https://github.com/llvm/llvm-project/commit/9d1fbbd2b9a00248eb8ea578c4047af4ec4da990
DIFF: https://github.com/llvm/llvm-project/commit/9d1fbbd2b9a00248eb8ea578c4047af4ec4da990.diff

LOG: [SROA][NFC] Remove Unused Parameter in `promoteAllocas()` (#128382)

Removing it because `Function &F` is not used by `promoteAllocas()`.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/SROA.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index e88c130cccf20..69e7ce83f82e4 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -252,7 +252,7 @@ class SROA {
   std::pair<bool /*Changed*/, bool /*CFGChanged*/> runOnAlloca(AllocaInst &AI);
   void clobberUse(Use &U);
   bool deleteDeadInstructions(SmallPtrSetImpl<AllocaInst *> &DeletedAllocas);
-  bool promoteAllocas(Function &F);
+  bool promoteAllocas();
 };
 
 } // end anonymous namespace
@@ -5693,7 +5693,7 @@ bool SROA::deleteDeadInstructions(
 /// This attempts to promote whatever allocas have been identified as viable in
 /// the PromotableAllocas list. If that list is empty, there is nothing to do.
 /// This function returns whether any promotion occurred.
-bool SROA::promoteAllocas(Function &F) {
+bool SROA::promoteAllocas() {
   if (PromotableAllocas.empty())
     return false;
 
@@ -5750,7 +5750,7 @@ std::pair<bool /*Changed*/, bool /*CFGChanged*/> SROA::runSROA(Function &F) {
       }
     }
 
-    Changed |= promoteAllocas(F);
+    Changed |= promoteAllocas();
 
     Worklist = PostPromotionWorklist;
     PostPromotionWorklist.clear();


        


More information about the llvm-commits mailing list