[PATCH] D125565: [AMDGPU] Extract SIInstrInfo::removeModOperands. NFC.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 10:33:40 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:2903
 
-static void removeModOperands(MachineInstr &MI) {
-  unsigned Opc = MI.getOpcode();
-  int Src0ModIdx = AMDGPU::getNamedOperandIdx(Opc,
-                                              AMDGPU::OpName::src0_modifiers);
-  int Src1ModIdx = AMDGPU::getNamedOperandIdx(Opc,
-                                              AMDGPU::OpName::src1_modifiers);
-  int Src2ModIdx = AMDGPU::getNamedOperandIdx(Opc,
-                                              AMDGPU::OpName::src2_modifiers);
+static ArrayRef<unsigned> getModifierOpNames() {
+  static const unsigned OpNames[] = {
----------------
Don’t see the point of this being a function instead of a global constexpr 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125565/new/

https://reviews.llvm.org/D125565



More information about the llvm-commits mailing list