[llvm] 54246a3 - [RISCV] Pass VSETVLIInfo by const reference. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 16:51:28 PST 2025


Author: Craig Topper
Date: 2025-01-03T16:51:08-08:00
New Revision: 54246a39e4cb06cec7d4bafb014e3cad73b1e4df

URL: https://github.com/llvm/llvm-project/commit/54246a39e4cb06cec7d4bafb014e3cad73b1e4df
DIFF: https://github.com/llvm/llvm-project/commit/54246a39e4cb06cec7d4bafb014e3cad73b1e4df.diff

LOG: [RISCV] Pass VSETVLIInfo by const reference. NFC

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index 75985832594d45..1fd130d7e040e4 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -627,7 +627,7 @@ class VSETVLIInfo {
     return MI;
   }
 
-  void setAVL(VSETVLIInfo Info) {
+  void setAVL(const VSETVLIInfo &Info) {
     assert(Info.isValid());
     if (Info.isUnknown())
       setUnknown();
@@ -1223,7 +1223,8 @@ bool RISCVInsertVSETVLI::needVSETVLI(const DemandedFields &Used,
 // If we don't use LMUL or the SEW/LMUL ratio, then adjust LMUL so that we
 // maintain the SEW/LMUL ratio. This allows us to eliminate VL toggles in more
 // places.
-static VSETVLIInfo adjustIncoming(VSETVLIInfo PrevInfo, VSETVLIInfo NewInfo,
+static VSETVLIInfo adjustIncoming(const VSETVLIInfo &PrevInfo,
+                                  const VSETVLIInfo &NewInfo,
                                   DemandedFields &Demanded) {
   VSETVLIInfo Info = NewInfo;
 


        


More information about the llvm-commits mailing list