[llvm] 0d37e5c - [RISCV] Remove redundant TSFlags parameter in RISCVInsertVSETVLI. NFC

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 13:30:35 PDT 2024


Author: Luke Lau
Date: 2024-05-29T21:30:08+01:00
New Revision: 0d37e5c61797d6075f02daf28d1b16561299bc69

URL: https://github.com/llvm/llvm-project/commit/0d37e5c61797d6075f02daf28d1b16561299bc69
DIFF: https://github.com/llvm/llvm-project/commit/0d37e5c61797d6075f02daf28d1b16561299bc69.diff

LOG: [RISCV] Remove redundant TSFlags parameter in RISCVInsertVSETVLI. 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 f350644d4512e..4c57eecd8465d 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -908,8 +908,7 @@ class RISCVInsertVSETVLI : public MachineFunctionPass {
   void coalesceVSETVLIs(MachineBasicBlock &MBB) const;
 
   VSETVLIInfo getInfoForVSETVLI(const MachineInstr &MI) const;
-  VSETVLIInfo computeInfoForInstr(const MachineInstr &MI,
-                                  uint64_t TSFlags) const;
+  VSETVLIInfo computeInfoForInstr(const MachineInstr &MI) const;
 };
 
 } // end anonymous namespace
@@ -957,9 +956,10 @@ static unsigned computeVLMAX(unsigned VLEN, unsigned SEW,
   return VLEN/SEW;
 }
 
-VSETVLIInfo RISCVInsertVSETVLI::computeInfoForInstr(const MachineInstr &MI,
-                                                    uint64_t TSFlags) const {
+VSETVLIInfo
+RISCVInsertVSETVLI::computeInfoForInstr(const MachineInstr &MI) const {
   VSETVLIInfo InstrInfo;
+  const uint64_t TSFlags = MI.getDesc().TSFlags;
 
   bool TailAgnostic = true;
   bool MaskAgnostic = true;
@@ -1198,13 +1198,12 @@ static VSETVLIInfo adjustIncoming(VSETVLIInfo PrevInfo, VSETVLIInfo NewInfo,
 // legal for MI, but may not be the state requested by MI.
 void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
                                         const MachineInstr &MI) const {
-  uint64_t TSFlags = MI.getDesc().TSFlags;
-  if (!RISCVII::hasSEWOp(TSFlags))
+  if (!RISCVII::hasSEWOp(MI.getDesc().TSFlags))
     return;
 
   DemandedFields Demanded = getDemanded(MI, ST);
 
-  const VSETVLIInfo NewInfo = computeInfoForInstr(MI, TSFlags);
+  const VSETVLIInfo NewInfo = computeInfoForInstr(MI);
   assert(NewInfo.isValid() && !NewInfo.isUnknown());
   if (Info.isValid() && !needVSETVLI(Demanded, NewInfo, Info))
     return;


        


More information about the llvm-commits mailing list