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

Thomas Symalla via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 30 05:46:52 PST 2022


tsymalla created this revision.
tsymalla added a reviewer: nhaehnle.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
tsymalla requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140778

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


Index: llvm/lib/Target/AMDGPU/SIInstrInfo.h
===================================================================
--- llvm/lib/Target/AMDGPU/SIInstrInfo.h
+++ llvm/lib/Target/AMDGPU/SIInstrInfo.h
@@ -188,9 +188,9 @@
 
   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 +266,11 @@
     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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140778.485689.patch
Type: text/x-patch
Size: 1391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221230/0d3b6f48/attachment.bin>


More information about the llvm-commits mailing list