Skip to content

Commit dd4776d

Browse files
authored
AMDGPU: Remove AMDGPUInstrInfo class (#144984)
This was never constructed and only provided one static helper function.
1 parent f577516 commit dd4776d

File tree

7 files changed

+8
-18
lines changed

7 files changed

+8
-18
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3936,7 +3936,7 @@ bool AMDGPUDAGToDAGISel::isUniformLoad(const SDNode *N) const {
39363936
const auto *Ld = cast<LoadSDNode>(N);
39373937

39383938
const MachineMemOperand *MMO = Ld->getMemOperand();
3939-
if (N->isDivergent() && !AMDGPUInstrInfo::isUniformMMO(MMO))
3939+
if (N->isDivergent() && !AMDGPU::isUniformMMO(MMO))
39403940
return false;
39413941

39423942
return MMO->getSize().hasValue() &&

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ bool AMDGPUTargetLowering::shouldReduceLoadWidth(
848848
AS == AMDGPUAS::CONSTANT_ADDRESS_32BIT ||
849849
(isa<LoadSDNode>(N) && AS == AMDGPUAS::GLOBAL_ADDRESS &&
850850
MN->isInvariant())) &&
851-
AMDGPUInstrInfo::isUniformMMO(MN->getMemOperand()))
851+
AMDGPU::isUniformMMO(MN->getMemOperand()))
852852
return false;
853853

854854
// Don't produce extloads from sub 32-bit types. SI doesn't have scalar

llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,12 @@
2222

2323
using namespace llvm;
2424

25-
// Pin the vtable to this file.
26-
//void AMDGPUInstrInfo::anchor() {}
27-
28-
AMDGPUInstrInfo::AMDGPUInstrInfo(const GCNSubtarget &ST) { }
29-
3025
Intrinsic::ID AMDGPU::getIntrinsicID(const MachineInstr &I) {
3126
return I.getOperand(I.getNumExplicitDefs()).getIntrinsicID();
3227
}
3328

3429
// TODO: Should largely merge with AMDGPUTTIImpl::isSourceOfDivergence.
35-
bool AMDGPUInstrInfo::isUniformMMO(const MachineMemOperand *MMO) {
30+
bool AMDGPU::isUniformMMO(const MachineMemOperand *MMO) {
3631
const Value *Ptr = MMO->getValue();
3732
// UndefValue means this is a load of a kernel input. These are uniform.
3833
// Sometimes LDS instructions have constant pointers.

llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,10 @@ class GCNSubtarget;
2323
class MachineMemOperand;
2424
class MachineInstr;
2525

26-
class AMDGPUInstrInfo {
27-
public:
28-
explicit AMDGPUInstrInfo(const GCNSubtarget &st);
29-
30-
static bool isUniformMMO(const MachineMemOperand *MMO);
31-
};
32-
3326
namespace AMDGPU {
3427

28+
bool isUniformMMO(const MachineMemOperand *MMO);
29+
3530
/// Return the intrinsic ID for opcodes with the G_AMDGPU_INTRIN_ prefix.
3631
///
3732
/// These opcodes have an Intrinsic::ID operand similar to a GIntrinsic. But

llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ RegBankLegalizeRules::RegBankLegalizeRules(const GCNSubtarget &_ST,
630630
});
631631

632632
Predicate isUniMMO([](const MachineInstr &MI) -> bool {
633-
return AMDGPUInstrInfo::isUniformMMO(*MI.memoperands_begin());
633+
return AMDGPU::isUniformMMO(*MI.memoperands_begin());
634634
});
635635

636636
Predicate isConst([](const MachineInstr &MI) -> bool {

llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ bool AMDGPURegisterBankInfo::isScalarLoadLegal(const MachineInstr &MI) const {
463463
(IsConst || !MMO->isVolatile()) &&
464464
// Memory must be known constant, or not written before this load.
465465
(IsConst || MMO->isInvariant() || (MMO->getFlags() & MONoClobber)) &&
466-
AMDGPUInstrInfo::isUniformMMO(MMO);
466+
AMDGPU::isUniformMMO(MMO);
467467
}
468468

469469
RegisterBankInfo::InstructionMappings

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10866,7 +10866,7 @@ SDValue SITargetLowering::LowerLOAD(SDValue Op, SelectionDAG &DAG) const {
1086610866
(AS == AMDGPUAS::GLOBAL_ADDRESS &&
1086710867
Subtarget->getScalarizeGlobalBehavior() && Load->isSimple() &&
1086810868
isMemOpHasNoClobberedMemOperand(Load))) {
10869-
if ((!Op->isDivergent() || AMDGPUInstrInfo::isUniformMMO(MMO)) &&
10869+
if ((!Op->isDivergent() || AMDGPU::isUniformMMO(MMO)) &&
1087010870
Alignment >= Align(4) && NumElements < 32) {
1087110871
if (MemVT.isPow2VectorType() ||
1087210872
(Subtarget->hasScalarDwordx3Loads() && NumElements == 3))

0 commit comments

Comments
 (0)