[llvm] 2a48995 - [ARM] Pass ArrayRef by value instead of const reference. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 13 23:08:40 PDT 2025


Author: Craig Topper
Date: 2025-03-13T23:07:45-07:00
New Revision: 2a48995a03ca5a615161565f24411dc11288bb3c

URL: https://github.com/llvm/llvm-project/commit/2a48995a03ca5a615161565f24411dc11288bb3c
DIFF: https://github.com/llvm/llvm-project/commit/2a48995a03ca5a615161565f24411dc11288bb3c.diff

LOG: [ARM] Pass ArrayRef by value instead of const reference. NFC

Added: 
    

Modified: 
    llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
index a0624ba64aeaf..2d45c42e724db 100644
--- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
@@ -612,7 +612,7 @@ void ARMLoadStoreOpt::moveLiveRegsBefore(const MachineBasicBlock &MBB,
   }
 }
 
-static bool ContainsReg(const ArrayRef<std::pair<unsigned, bool>> &Regs,
+static bool ContainsReg(ArrayRef<std::pair<unsigned, bool>> Regs,
                         unsigned Reg) {
   for (const std::pair<unsigned, bool> &R : Regs)
     if (R.first == Reg)


        


More information about the llvm-commits mailing list