[llvm] 9aa0ee3 - [NFC][AMDGPU] Make method declarations in SIInstrInfo equivalent to their definitions.

Thomas Symalla via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 30 10:18:47 PST 2022


Author: Thomas Symalla
Date: 2022-12-30T19:18:41+01:00
New Revision: 9aa0ee36fe73d8fd29c848f5ecd63422618849ec

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

LOG: [NFC][AMDGPU] Make method declarations in SIInstrInfo equivalent to their definitions.

Some functions from SIInstrInfo have their operands named different in
their declarations vs. their defs. This was caught by cppcheck.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D140778

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIInstrInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.h b/llvm/lib/Target/AMDGPU/SIInstrInfo.h
index 4782b3a7bc20..9f754821c8c7 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.h
@@ -188,9 +188,8 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
 
   bool isIgnorableUse(const MachineOperand &MO) const override;
 
-  bool areLoadsFromSameBasePtr(SDNode *Load1, SDNode *Load2,
-                               int64_t &Offset1,
-                               int64_t &Offset2) const override;
+  bool areLoadsFromSameBasePtr(SDNode *Load0, SDNode *Load1, int64_t &Offset0,
+                               int64_t &Offset1) const override;
 
   bool getMemOperandsWithOffsetWidth(
       const MachineInstr &LdSt,
@@ -266,11 +265,11 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
     return commuteOpcode(MI.getOpcode());
   }
 
-  bool findCommutedOpIndices(const MachineInstr &MI, unsigned &SrcOpIdx1,
-                             unsigned &SrcOpIdx2) const override;
+  bool findCommutedOpIndices(const MachineInstr &MI, unsigned &SrcOpIdx0,
+                             unsigned &SrcOpIdx1) const override;
 
-  bool findCommutedOpIndices(MCInstrDesc Desc, unsigned & SrcOpIdx0,
-   unsigned & SrcOpIdx1) const;
+  bool findCommutedOpIndices(MCInstrDesc Desc, unsigned &SrcOpIdx0,
+                             unsigned &SrcOpIdx1) const;
 
   bool isBranchOffsetInRange(unsigned BranchOpc,
                              int64_t BrOffset) const override;


        


More information about the llvm-commits mailing list