Skip to content

Commit 1c325a0

Browse files
authored
AMDGPU: Stop checking allocatable in adjustAllocatableRegClass (#158105)
This no longer does anything.
1 parent 1083289 commit 1c325a0

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5975,12 +5975,10 @@ SIInstrInfo::getWholeWaveFunctionSetup(MachineFunction &MF) const {
59755975

59765976
static const TargetRegisterClass *
59775977
adjustAllocatableRegClass(const GCNSubtarget &ST, const SIRegisterInfo &RI,
5978-
const MCInstrDesc &TID, unsigned RCID,
5979-
bool IsAllocatable) {
5980-
if ((IsAllocatable || !ST.hasGFX90AInsts()) &&
5981-
(((TID.mayLoad() || TID.mayStore()) &&
5982-
!(TID.TSFlags & SIInstrFlags::Spill)) ||
5983-
(TID.TSFlags & SIInstrFlags::MIMG))) {
5978+
const MCInstrDesc &TID, unsigned RCID) {
5979+
if (!ST.hasGFX90AInsts() && (((TID.mayLoad() || TID.mayStore()) &&
5980+
!(TID.TSFlags & SIInstrFlags::Spill)) ||
5981+
(TID.TSFlags & SIInstrFlags::MIMG))) {
59845982
switch (RCID) {
59855983
case AMDGPU::AV_32RegClassID:
59865984
RCID = AMDGPU::VGPR_32RegClassID;
@@ -6020,7 +6018,7 @@ const TargetRegisterClass *SIInstrInfo::getRegClass(const MCInstrDesc &TID,
60206018
return RI.getRegClass(RegClass);
60216019
}
60226020

6023-
return adjustAllocatableRegClass(ST, RI, TID, RegClass, false);
6021+
return adjustAllocatableRegClass(ST, RI, TID, RegClass);
60246022
}
60256023

60266024
const TargetRegisterClass *SIInstrInfo::getOpRegClass(const MachineInstr &MI,
@@ -6039,7 +6037,7 @@ const TargetRegisterClass *SIInstrInfo::getOpRegClass(const MachineInstr &MI,
60396037
}
60406038

60416039
unsigned RCID = Desc.operands()[OpNo].RegClass;
6042-
return adjustAllocatableRegClass(ST, RI, Desc, RCID, true);
6040+
return adjustAllocatableRegClass(ST, RI, Desc, RCID);
60436041
}
60446042

60456043
void SIInstrInfo::legalizeOpWithMove(MachineInstr &MI, unsigned OpIdx) const {

0 commit comments

Comments
 (0)