[PATCH] D140799: [AMDGPU][AsmParser][NFC] Refine defining i8- and i16-typed custom operands.
Dmitry Preobrazhensky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 04:24:57 PST 2023
dp added a comment.
Herald added a subscriber: StephenFan.
In general, I like your idea and I see that further improvements are possible. Your second patch seems to better justify this approach.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.td:1191
+ let ParserMatchClass = Class;
+ let OperandType = "OPERAND_IMMEDIATE";
}
----------------
This is actually unused.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.td:1194
+class NamedOperandClass<string Prefix, string Name>
+ : CustomOperandClass<Name, 1> {
----------------
Are you going to further generalize this class?
The name does not reflect limitations on the expected syntax (an int with prefix).
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.td:1202
+
+class NamedOperand<ValueType Type, string Prefix, string Name = NAME>
+ : CustomOperand<Type, 1, Name, NamedOperandClass<Prefix, Name>>;
----------------
Ditto.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140799/new/
https://reviews.llvm.org/D140799
More information about the llvm-commits
mailing list