Skip to content

Commit ca0dae0

Browse files
authored
[AMDGPU][NFC] Eliminate GCNPredicateControl. (llvm#93964)
Removes ~100K instances of SIAssemblerPredicate and VIAssemblerPredicate fields from instruction records.
1 parent 5e423f1 commit ca0dae0

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

llvm/lib/Target/AMDGPU/SIInstrFormats.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class InstSI <dag outs, dag ins, string asm = "",
1414
list<dag> pattern = []> :
15-
AMDGPUInst<outs, ins, asm, pattern>, GCNPredicateControl {
15+
AMDGPUInst<outs, ins, asm, pattern>, PredicateControl {
1616
// Low bits - basic encoding information.
1717
field bit SALU = 0;
1818
field bit VALU = 0;

llvm/lib/Target/AMDGPU/SIInstrInfo.td

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ def isWave32 : Predicate<"Subtarget->getWavefrontSize() == 32">,
1111
def isWave64 : Predicate<"Subtarget->getWavefrontSize() == 64">,
1212
AssemblerPredicate <(all_of FeatureWavefrontSize64)>;
1313

14-
class GCNPredicateControl : PredicateControl {
15-
Predicate SIAssemblerPredicate = isGFX6GFX7;
16-
Predicate VIAssemblerPredicate = isGFX8GFX9;
17-
}
18-
1914
class AMDGPUMnemonicAlias<string From, string To, string VariantName = "">
20-
: MnemonicAlias<From, To, VariantName>, GCNPredicateControl;
15+
: MnemonicAlias<From, To, VariantName>, PredicateControl;
2116

2217
// Except for the NONE field, this must be kept in sync with the
2318
// SIEncodingFamily enum in SIInstrInfo.cpp and the columns of the
@@ -2670,7 +2665,7 @@ class VINTRP_Real_vi <bits <2> op, string opName, dag outs, dag ins,
26702665
VINTRPCommon <outs, ins, asm, []>,
26712666
VINTRPe_vi <op>,
26722667
SIMCInstr<opName, SIEncodingFamily.VI> {
2673-
let AssemblerPredicate = VIAssemblerPredicate;
2668+
let AssemblerPredicate = isGFX8GFX9;
26742669
let DecoderNamespace = "GFX8";
26752670
}
26762671

llvm/lib/Target/AMDGPU/SIInstructions.td

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
// that are not yet supported remain commented out.
1111
//===----------------------------------------------------------------------===//
1212

13-
class GCNPat<dag pattern, dag result> : Pat<pattern, result>, GCNPredicateControl {
14-
15-
}
13+
class GCNPat<dag pattern, dag result> : Pat<pattern, result>, PredicateControl;
1614

1715
class UniformSextInreg<ValueType VT> : PatFrag<
1816
(ops node:$src),

0 commit comments

Comments
 (0)