Skip to content

Commit

Permalink
[AMDGPU] Remove unused VGPRSingleUseHintInsts feature (llvm#109769)
Browse files Browse the repository at this point in the history
Fixes SWDEV-498470

(cherry picked from commit 396f677)
Change-Id: If965dab720db1a0fe76af6014ae6e57476c0c6d3
  • Loading branch information
ScottEgerton authored and jharryma committed Dec 9, 2024
1 parent 5d263ce commit 1e0fda7
Show file tree
Hide file tree
Showing 16 changed files with 5 additions and 842 deletions.
4 changes: 1 addition & 3 deletions llvm/docs/AMDGPUUsage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,7 @@ greater than or equal to the version in which the processor was added to the gen
- ``gfx1151``

SALU floating point instructions
and single-use VGPR hint
instructions are not available
on:
are not available on:

- ``gfx1150``
- ``gfx1151``
Expand Down
3 changes: 0 additions & 3 deletions llvm/lib/Target/AMDGPU/AMDGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,6 @@ extern char &SIModeRegisterID;
void initializeAMDGPUInsertDelayAluPass(PassRegistry &);
extern char &AMDGPUInsertDelayAluID;

void initializeAMDGPUInsertSingleUseVDSTPass(PassRegistry &);
extern char &AMDGPUInsertSingleUseVDSTID;

void initializeSIInsertHardClausesPass(PassRegistry &);
extern char &SIInsertHardClausesID;

Expand Down
17 changes: 2 additions & 15 deletions llvm/lib/Target/AMDGPU/AMDGPU.td
Original file line number Diff line number Diff line change
Expand Up @@ -865,12 +865,6 @@ def FeatureSALUFloatInsts : SubtargetFeature<"salu-float",
"Has SALU floating point instructions"
>;

def FeatureVGPRSingleUseHintInsts : SubtargetFeature<"vgpr-singleuse-hint",
"HasVGPRSingleUseHintInsts",
"true",
"Has single-use VGPR hint instructions"
>;

def FeaturePseudoScalarTrans : SubtargetFeature<"pseudo-scalar-trans",
"HasPseudoScalarTrans",
"true",
Expand Down Expand Up @@ -1511,21 +1505,18 @@ def FeatureISAVersion11_0_3 : FeatureSet<
def FeatureISAVersion11_5_0 : FeatureSet<
!listconcat(FeatureISAVersion11_Common.Features,
[FeatureSALUFloatInsts,
FeatureDPPSrc1SGPR,
FeatureVGPRSingleUseHintInsts])>;
FeatureDPPSrc1SGPR])>;

def FeatureISAVersion11_5_1 : FeatureSet<
!listconcat(FeatureISAVersion11_Common.Features,
[FeatureSALUFloatInsts,
FeatureDPPSrc1SGPR,
FeatureVGPRSingleUseHintInsts,
FeatureGFX11FullVGPRs])>;

def FeatureISAVersion11_5_2 : FeatureSet<
!listconcat(FeatureISAVersion11_Common.Features,
[FeatureSALUFloatInsts,
FeatureDPPSrc1SGPR,
FeatureVGPRSingleUseHintInsts])>;
FeatureDPPSrc1SGPR])>;

def FeatureISAVersion12 : FeatureSet<
[FeatureGFX12,
Expand Down Expand Up @@ -1555,7 +1546,6 @@ def FeatureISAVersion12 : FeatureSet<
FeatureSALUFloatInsts,
FeaturePseudoScalarTrans,
FeatureHasRestrictedSOffset,
FeatureVGPRSingleUseHintInsts,
FeatureScalarDwordx3Loads,
FeatureDPPSrc1SGPR]>;

Expand Down Expand Up @@ -2115,9 +2105,6 @@ def HasNotMADIntraFwdBug : Predicate<"!Subtarget->hasMADIntraFwdBug()">;
def HasSALUFloatInsts : Predicate<"Subtarget->hasSALUFloatInsts()">,
AssemblerPredicate<(all_of FeatureSALUFloatInsts)>;

def HasVGPRSingleUseHintInsts : Predicate<"Subtarget->hasVGPRSingleUseHintInsts()">,
AssemblerPredicate<(all_of FeatureVGPRSingleUseHintInsts)>;

def HasPseudoScalarTrans : Predicate<"Subtarget->hasPseudoScalarTrans()">,
AssemblerPredicate<(all_of FeaturePseudoScalarTrans)>;

Expand Down
122 changes: 0 additions & 122 deletions llvm/lib/Target/AMDGPU/AMDGPUInsertSingleUseVDST.cpp

This file was deleted.

10 changes: 0 additions & 10 deletions llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,6 @@ static cl::opt<bool> EnableSIModeRegisterPass(
cl::init(true),
cl::Hidden);

// Enable GFX11.5+ s_singleuse_vdst insertion
static cl::opt<bool>
EnableInsertSingleUseVDST("amdgpu-enable-single-use-vdst",
cl::desc("Enable s_singleuse_vdst insertion"),
cl::init(false), cl::Hidden);

// Enable GFX11+ s_delay_alu insertion
static cl::opt<bool>
EnableInsertDelayAlu("amdgpu-enable-delay-alu",
Expand Down Expand Up @@ -482,7 +476,6 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTarget() {
initializeAMDGPURewriteUndefForPHILegacyPass(*PR);
initializeAMDGPUUnifyMetadataPass(*PR);
initializeSIAnnotateControlFlowPass(*PR);
initializeAMDGPUInsertSingleUseVDSTPass(*PR);
initializeAMDGPUInsertDelayAluPass(*PR);
initializeSIInsertHardClausesPass(*PR);
initializeSIInsertWaitcntsPass(*PR);
Expand Down Expand Up @@ -1624,9 +1617,6 @@ void GCNPassConfig::addPreEmitPass() {
// cases.
addPass(&PostRAHazardRecognizerID);

if (isPassEnabled(EnableInsertSingleUseVDST, CodeGenOptLevel::Less))
addPass(&AMDGPUInsertSingleUseVDSTID);

if (isPassEnabled(EnableInsertDelayAlu, CodeGenOptLevel::Less))
addPass(&AMDGPUInsertDelayAluID);

Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Target/AMDGPU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ add_llvm_target(AMDGPUCodeGen
AMDGPUMacroFusion.cpp
AMDGPUMCInstLower.cpp
AMDGPUIGroupLP.cpp
AMDGPUInsertSingleUseVDST.cpp
AMDGPUMarkLastScratchLoad.cpp
AMDGPUMIRFormatter.cpp
AMDGPUOpenCLEnqueuedBlockLowering.cpp
Expand Down
3 changes: 0 additions & 3 deletions llvm/lib/Target/AMDGPU/GCNSubtarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
bool HasPackedTID = false;
bool ScalarizeGlobal = false;
bool HasSALUFloatInsts = false;
bool HasVGPRSingleUseHintInsts = false;
bool HasPseudoScalarTrans = false;
bool HasRestrictedSOffset = false;

Expand Down Expand Up @@ -1210,8 +1209,6 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,

bool hasSALUFloatInsts() const { return HasSALUFloatInsts; }

bool hasVGPRSingleUseHintInsts() const { return HasVGPRSingleUseHintInsts; }

bool hasPseudoScalarTrans() const { return HasPseudoScalarTrans; }

bool hasRestrictedSOffset() const { return HasRestrictedSOffset; }
Expand Down
11 changes: 0 additions & 11 deletions llvm/lib/Target/AMDGPU/SOPInstructions.td
Original file line number Diff line number Diff line change
Expand Up @@ -1716,11 +1716,6 @@ let SubtargetPredicate = isGFX11Plus in {
"$simm16">;
} // End SubtargetPredicate = isGFX11Plus

let SubtargetPredicate = HasVGPRSingleUseHintInsts in {
def S_SINGLEUSE_VDST :
SOPP_Pseudo<"s_singleuse_vdst", (ins s16imm:$simm16), "$simm16">;
} // End SubtargetPredicate = HasVGPRSingeUseHintInsts

let SubtargetPredicate = isGFX12Plus, hasSideEffects = 1 in {
def S_WAIT_LOADCNT :
SOPP_Pseudo<"s_wait_loadcnt", (ins s16imm:$simm16), "$simm16",
Expand Down Expand Up @@ -2663,12 +2658,6 @@ defm S_ICACHE_INV : SOPP_Real_32_gfx11_gfx12<0x03c>;

defm S_BARRIER : SOPP_Real_32_gfx11<0x03d>;

//===----------------------------------------------------------------------===//
// SOPP - GFX1150, GFX12.
//===----------------------------------------------------------------------===//

defm S_SINGLEUSE_VDST : SOPP_Real_32_gfx11_gfx12<0x013>;

//===----------------------------------------------------------------------===//
// SOPP - GFX6, GFX7, GFX8, GFX9, GFX10
//===----------------------------------------------------------------------===//
Expand Down
Loading

0 comments on commit 1e0fda7

Please sign in to comment.