[llvm] de99aab - AMDGPU: Remove unused argument from adjustAllocatableRegClass (#155554)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 23:00:38 PDT 2025
Author: Matt Arsenault
Date: 2025-08-27T06:00:34Z
New Revision: de99aabed6664b16e5bc30edd27680a9b7ae0dd3
URL: https://github.com/llvm/llvm-project/commit/de99aabed6664b16e5bc30edd27680a9b7ae0dd3
DIFF: https://github.com/llvm/llvm-project/commit/de99aabed6664b16e5bc30edd27680a9b7ae0dd3.diff
LOG: AMDGPU: Remove unused argument from adjustAllocatableRegClass (#155554)
Added:
Modified:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 3b5b3687967c9..e62a69a4146a7 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -5939,7 +5939,6 @@ SIInstrInfo::getWholeWaveFunctionSetup(MachineFunction &MF) const {
static const TargetRegisterClass *
adjustAllocatableRegClass(const GCNSubtarget &ST, const SIRegisterInfo &RI,
- const MachineRegisterInfo &MRI,
const MCInstrDesc &TID, unsigned RCID,
bool IsAllocatable) {
if ((IsAllocatable || !ST.hasGFX90AInsts()) &&
@@ -5999,25 +5998,26 @@ const TargetRegisterClass *SIInstrInfo::getRegClass(const MCInstrDesc &TID,
TID.Opcode, AMDGPU::OpName::data1);
}
}
- return adjustAllocatableRegClass(ST, RI, MF.getRegInfo(), TID, RegClass,
- IsAllocatable);
+ return adjustAllocatableRegClass(ST, RI, TID, RegClass, IsAllocatable);
}
const TargetRegisterClass *SIInstrInfo::getOpRegClass(const MachineInstr &MI,
unsigned OpNo) const {
- const MachineRegisterInfo &MRI = MI.getParent()->getParent()->getRegInfo();
const MCInstrDesc &Desc = get(MI.getOpcode());
if (MI.isVariadic() || OpNo >= Desc.getNumOperands() ||
Desc.operands()[OpNo].RegClass == -1) {
Register Reg = MI.getOperand(OpNo).getReg();
- if (Reg.isVirtual())
+ if (Reg.isVirtual()) {
+ const MachineRegisterInfo &MRI =
+ MI.getParent()->getParent()->getRegInfo();
return MRI.getRegClass(Reg);
+ }
return RI.getPhysRegBaseClass(Reg);
}
unsigned RCID = Desc.operands()[OpNo].RegClass;
- return adjustAllocatableRegClass(ST, RI, MRI, Desc, RCID, true);
+ return adjustAllocatableRegClass(ST, RI, Desc, RCID, true);
}
void SIInstrInfo::legalizeOpWithMove(MachineInstr &MI, unsigned OpIdx) const {
More information about the llvm-commits
mailing list