Skip to content

Commit fcba304

Browse files
authored
AMDGPU: Remove override of TargetInstrInfo::getRegClass (llvm#159886)
This should not be overridable and the special case hacks have been replaced with RegClassByHwMode
1 parent 95dfe79 commit fcba304

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6023,18 +6023,6 @@ SIInstrInfo::getWholeWaveFunctionSetup(MachineFunction &MF) const {
60236023
llvm_unreachable("Couldn't find SI_SETUP_WHOLE_WAVE_FUNC instruction");
60246024
}
60256025

6026-
// FIXME: This should not be an overridable function. All subtarget dependent
6027-
// operand modifications should go through isLookupRegClassByHwMode in the
6028-
// generic handling.
6029-
const TargetRegisterClass *SIInstrInfo::getRegClass(const MCInstrDesc &TID,
6030-
unsigned OpNum) const {
6031-
if (OpNum >= TID.getNumOperands())
6032-
return nullptr;
6033-
const MCOperandInfo &OpInfo = TID.operands()[OpNum];
6034-
int16_t RegClass = getOpRegClassID(OpInfo);
6035-
return RegClass < 0 ? nullptr : RI.getRegClass(RegClass);
6036-
}
6037-
60386026
const TargetRegisterClass *SIInstrInfo::getOpRegClass(const MachineInstr &MI,
60396027
unsigned OpNo) const {
60406028
const MCInstrDesc &Desc = get(MI.getOpcode());

llvm/lib/Target/AMDGPU/SIInstrInfo.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,9 +1619,6 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
16191619
/// Return true if this opcode should not be used by codegen.
16201620
bool isAsmOnlyOpcode(int MCOp) const;
16211621

1622-
const TargetRegisterClass *getRegClass(const MCInstrDesc &TID,
1623-
unsigned OpNum) const override;
1624-
16251622
void fixImplicitOperands(MachineInstr &MI) const;
16261623

16271624
MachineInstr *foldMemoryOperandImpl(MachineFunction &MF, MachineInstr &MI,

0 commit comments

Comments
 (0)