llvm-project/llvm/test/TableGen
Nikita Popov 2a26a445b3 [Attributes] Make intrinsic attribute generation more flexible (NFC)
Currently attributes for intrinsics are emitted using the
ArrayRef<AttrKind> based constructor for AttributeLists. This works
out fine for simple enum attributes, but doesn't really generalize
to attributes that accept values. We're already doing something
awkward for alignment attributes, and I'd like to have a cleaner
solution to this with
https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579 in mind.

The new generation approach is to instead directly construct
Attributes, giving us access to the full generality of that
interface. To avoid significantly increasing the size of the
generated code, we now also deduplicate the attribute sets. The
code generated per unique AttributeList looks like this:

  case 204: {
    AS[0] = {1, getIntrinsicArgAttributeSet(C, 5)};
    AS[1] = {AttributeList::FunctionIndex, getIntrinsicFnAttributeSet(C, 10)};
    NumAttrs = 2;
    break;
  }

and then the helper functions contain something like

  case 5:
    return AttributeSet::get(C, {
      Attribute::get(C, Attribute::NoCapture),
    });

and

  case 10:
    return AttributeSet::get(C, {
      Attribute::get(C, Attribute::NoUnwind),
      Attribute::get(C, Attribute::ArgMemOnly),
    });

A casualty of this change is the intrin-properties.td test, as I
don't think that FileCheck allows matching this kind of output.

Differential Revision: https://reviews.llvm.org/D135679
2022-10-12 10:56:01 +02:00
..
Common [TableGen] [tests] Change integer ranges to use new '...' punctuation 2020-10-26 10:47:29 -04:00
FixedLenDecoderEmitter [TableGen] Fix excessive compile time issue in FixedLenDecoderEmitter 2021-03-17 09:28:50 +00:00
GICombinerEmitter [GISel] TreeMatcher: always skip leaves if they don't care 2022-09-20 20:55:02 +00:00
2003-08-03-PassCode.td
2006-09-18-LargeInt.td
2010-03-24-PrematureDefaults.td [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
AliasAsmString.td
AllowDuplicateRegisterNames.td Change range operator from deprecated '-' to '...' 2020-09-12 16:26:32 -04:00
AnonDefinitionOnDemand.td
AsmPredicateCombining.td [AArch64] Add target feature "all" 2022-06-30 10:37:58 -07:00
AsmPredicateCombiningRISCV.td [RISCV][TableGen] Mark MachineInstr with FrameIndex as not compressible 2022-08-24 13:23:38 +08:00
AsmPredicateCondsEmission.td
AsmVariant.td
AsmWriterPCRelOp.td [TableGen] Fix printing second PC-relative operand 2021-06-23 13:27:37 +07:00
BigEncoder.td Change range operator from deprecated '-' to '...' 2020-09-12 16:26:32 -04:00
BitOffsetDecoder.td [TableGen] Fix excessive compile time issue in FixedLenDecoderEmitter 2021-03-17 09:28:50 +00:00
BitsInit.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
BitsInitOverflow.td
CStyleComment.td
ClassInstanceValue.td
CodeGenSchedule-duplicate-instrw.td
CompressWriteLatencyEntry.td [llvm-tblgen] CodeGenSchedModels::hasReadOfWrite gets wrong predication result 2022-09-19 14:22:43 +08:00
ConcatenatedSubregs.td
ConstraintChecking.inc
ConstraintChecking1.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
ConstraintChecking2.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
ConstraintChecking3.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
ConstraintChecking4.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
ConstraintChecking5.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
ConstraintChecking6.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
ConstraintChecking7.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
ContextlessPredicates.td [GlobalISel] Don't skip adding predicate matcher 2020-08-19 07:54:14 +00:00
DAGDefaultOps.td [TableGen] Use sign rotated VBR for OPC_EmitInteger. 2021-05-02 12:40:44 -07:00
Dag.td
DefaultOpsGlobalISel.td
DefmInherit.td
DefmInsideMultiClass.td
DuplicateFieldValues.td
FastISelEmitter.td
FieldAccess.td
ForeachList.td
ForeachLoop.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
ForwardRef.td
GenTags.td [TableGen] Add a location for a class definition that was forward-declared 2022-07-20 15:56:17 +02:00
GeneralList.td
GlobalISelEmitter-PR39045.td
GlobalISelEmitter-SDNodeXForm-timm.td
GlobalISelEmitter-atomic_store.td
GlobalISelEmitter-immAllZeroOne.td [TableGen] Remove spurious GISEL prefix from test. 2020-10-30 15:54:57 -04:00
GlobalISelEmitter-immarg-literal-pattern.td
GlobalISelEmitter-input-discard.td
GlobalISelEmitter-nested-subregs.td [TableGen][GlobalISel] add handling of nested *_SUBREG 2020-10-05 10:42:18 +02:00
GlobalISelEmitter-output-discard.td
GlobalISelEmitter-setcc.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
GlobalISelEmitter-zero-instr.td [GlobalISel][TableGen] Fix seg fault for zero instruction 2020-11-24 07:47:58 +01:00
GlobalISelEmitter-zero-reg.td [TableGen][GlobalISel] Fix handling of zero_reg 2020-09-18 11:01:11 +02:00
GlobalISelEmitter.td [TableGen] Add `countRendererFns` to `InstructionOperandMatcher` 2022-09-30 07:26:30 +00:00
GlobalISelEmitterCustomPredicate.td [TableGen/GlobalISel] Emit MI_predicate custom code for PatFrags (not only PatFrag) 2021-03-16 12:44:09 +01:00
GlobalISelEmitterMatchTableOptimizer.td [TableGen][GlobalISel] Fix tblgen optimization bug 2020-08-26 12:09:01 +02:00
GlobalISelEmitterMatchTableOptimizerSameOperand-invalid.td [GlobalISel][Tablegen] Fix SameOperandMatcher's isIdentical check 2021-10-28 13:37:12 +02:00
GlobalISelEmitterMatchTableOptimizerSameOperand.td [GlobalISel][Tablegen] Fix SameOperandMatcher's isIdentical check 2021-10-28 13:37:12 +02:00
GlobalISelEmitterOverloadedPtr.td
GlobalISelEmitterRegSequence.td
GlobalISelEmitterSkippedPatterns.td AMDGPU/GlobalISel/Emitter Recognize additional 'same operand checks' 2020-09-14 12:10:59 +02:00
GlobalISelEmitterSubreg.td [GlobalISel][TableGen] Fix ConstrainOperandRC bug 2021-01-05 09:30:04 +01:00
GlobalISelEmitterVariadic.td
HasNoUse.td [GlobalISel][SelectionDAG] Implement the HasNoUse builtin predicate 2022-07-08 09:47:33 +05:30
HwModeEncodeDecode.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
HwModeSelect.td
Include.inc
Include.td
InsufficientPositionalOperands.td [TableGen] Add useDeprecatedPositionallyEncodedOperands option. 2022-09-24 09:40:45 -04:00
IntBitInit.td
IntSpecialValues.td
InvalidMCSchedClassDesc.td [MCA] Add support for in-order CPUs 2021-03-04 14:08:19 +03:00
JSON-check.py
JSON.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
LazyChange.td
LetInsideMultiClasses.td
ListArgs.td
ListArgsSimple.td
ListConversion.td
ListManip.td
ListOfList.td
ListSlices.td [TableGen] Resolve concrete but not complete field access initializers 2021-04-13 15:14:56 -07:00
LoLoL.td
MissingOperandField.td [TableGen] Add useDeprecatedPositionallyEncodedOperands option. 2022-09-24 09:40:45 -04:00
MixedCasedMnemonic.td [TableGen] const char *const x => const char x[] 2022-06-10 19:13:59 -07:00
MnemonicAlias.td [TableGen] Allow identical MnemonicAliases with no predicate 2021-06-30 10:53:39 +01:00
MultiClass-def-fail.td
MultiClass-defm-fail.td
MultiClass-defm.td
MultiClass.td
MultiClassDefName.td
MultiClassInherit.td
MultiPat.td
NestedForeach.td
Paste.td
RegisterBankEmitter.td
RegisterClass.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
RegisterEncoder.td
RegisterInfoEmitter-regcost-list.td Support a list of CostPerUse values 2021-01-29 10:14:52 +05:30
RegisterInfoEmitter-regcost-tuple.td Support a list of CostPerUse values 2021-01-29 10:14:52 +05:30
RegisterInfoEmitter-regcost.td Support a list of CostPerUse values 2021-01-29 10:14:52 +05:30
RegisterInfoEmitter-tsflags.td [TableGen] Allow target specific flags for RegisterClass 2021-08-31 22:29:11 -04:00
RelTest.td
SchedModelError.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
SetTheory.td
SiblingForeach.td
Slice.td
String.td
SuperSubclassSameName.td
TargetInstrInfo.td
TargetInstrSpec.td
TemplateArgRename.td [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
Tree.td
TreeNames.td
TwoLevelName.td
UnsetBitInit.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
UnterminatedComment.td
ValidIdentifiers.td
VarLenDecoder.td [NFC][test] Replace hardcoded number with numeric substitution blocks 2022-05-06 08:08:34 +08:00
VarLenEncoder.td [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf 2022-05-19 11:23:13 +01:00
address-space-patfrags.td TableGen/GlobalISel: Make address space/align predicates consistent 2022-04-22 15:48:07 -04:00
ambiguous-composition.td
arithmetic.td [TableGen] [AMDGPU] Add !sub operator for subtraction 2020-10-28 12:27:53 -04:00
assert.td [TableGen] Fix two bugs in 'defm' when complex 'assert' is involved. 2021-04-30 11:31:06 -04:00
bare-minimum-psets.td [TableGen] const char *const x => const char x[] 2022-06-10 19:13:59 -07:00
cast-list-initializer.td
cast-multiclass.td
cast-string.td [TableGen] Enhance !cast<string> to handle bit and bits types. 2021-01-14 10:20:35 -05:00
cast-typeerror.td
cast.td
code.td [TableGen] Eliminate the 'code' type 2020-12-03 10:19:11 -05:00
compare.td [TableGen] Enhance the six comparison bang operators. 2020-11-13 09:57:27 -05:00
cond-bitlist.td
cond-default.td
cond-empty-list-arg.td [TableGen] Eliminate uses of true and false in .td files. 2020-10-31 10:54:33 -04:00
cond-inheritance.td
cond-let.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
cond-list.td
cond-subclass.td [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
cond-type.td Enhance TableGen so that backends can produce better error messages. 2020-09-23 13:35:32 -04:00
cond-usage.td
condsbit.td [TableGen] Add true and false literals to represent booleans 2020-11-05 09:07:21 -05:00
dag-functional.td
dag-isel-complexpattern.td [TableGen][SelectionDAG] Use ComplexPattern type for non-leaf nodes 2021-12-03 07:04:59 +00:00
dag-isel-regclass-emit-enum.td [TableGen] Use sign rotated VBR for OPC_EmitInteger. 2021-05-02 12:40:44 -07:00
dag-isel-res-order.td
dag-isel-subregs.td [TableGen] Use sign rotated VBR for OPC_EmitInteger. 2021-05-02 12:40:44 -07:00
defmclass.td [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
defset-typeerror.td
defset.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
defvar.td
detailed-records.td [TableGen] [DetailedRecords] Print record name that is null string as "" 2021-01-27 10:41:46 -05:00
directive1.td [flang][openacc] Use TableGen to generate the clause parser 2022-07-18 09:26:57 +02:00
directive2.td [openacc][openmp] Reduce number of generated file and prefer inclusion of .inc 2021-03-23 09:16:53 -04:00
directive3.td [openacc][openmp] Reduce number of generated file and prefer inclusion of .inc 2021-03-23 09:16:53 -04:00
duplicate-include.inc
duplicate-include.td
empty-psets.td [TableGen] Allow targets to entirely ignore Psets for registers 2021-09-23 23:07:35 -04:00
empty.td [TableGen] Enhance !empty and !size to handle strings and DAGs. 2020-10-19 09:22:20 -04:00
eq-unset.td
eq.td
eqbit.td
exists-error-non-string.td [TableGen] Add new operator !exists 2022-06-23 11:11:47 +08:00
exists-error-record.td [TableGen] Add new operator !exists 2022-06-23 11:11:47 +08:00
exists-error-uninitialized.td [TableGen] Add new operator !exists 2022-06-23 11:11:47 +08:00
exists.td [TableGen] Add new operator !exists 2022-06-23 11:11:47 +08:00
field-access-initializers.td [TableGen] Resolve concrete but not complete field access initializers 2021-04-13 15:14:56 -07:00
filter.td [TableGen] Add the !filter bang operator. 2020-11-09 10:56:55 -05:00
find.td [TableGen] Add the !find bang operator 2021-04-28 09:51:00 -04:00
foldl.td
foreach-eval.td
foreach-leak.td Use {LITERAL} instead of regex escaping in some lit tests. NFC. 2022-01-14 10:55:00 +00:00
foreach-multiclass.td [TableGen] Fix instantiating multiclass in foreach 2021-01-29 10:25:33 -05:00
foreach-range-parse-errors0.td [TableGen] Add true and false literals to represent booleans 2020-11-05 09:07:21 -05:00
foreach-range-parse-errors1.td
foreach-range-parse-errors2.td
foreach-range-parse-errors3.td
foreach-range-parse-errors4.td
foreach-range-parse-errors5.td
foreach-variable-range.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
foreach.td
generic-tables-instruction.td
generic-tables.td [TableGen] Track reference locations of Records/RecordVals 2022-09-27 23:48:16 -07:00
get-operand-type-no-expand.td [TableGen] Add a knob for MCOperandInfo expansion in gen-instr-info 2022-06-29 00:59:16 -07:00
get-operand-type.td [TableGen] Emit instruction name in INSTRINFO_OPERAND_TYPE 2022-06-20 13:15:52 -07:00
getsetop.td [TableGen] Change !getop and !setop to !getdagop and !setdagop. 2020-10-23 10:36:05 -04:00
gisel-physreg-input.td
if-empty-list-arg.td
if-type.td Enhance TableGen so that backends can produce better error messages. 2020-09-23 13:35:32 -04:00
if.td [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
ifbit.td
ifstmt.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
immarg-predicated.td [GISel] Teach TableGen to check predicates of immediate operands in patterns 2021-04-30 10:18:45 +02:00
immarg.td
inhibit-pset.td [TableGen] const char *const x => const char x[] 2022-06-10 19:13:59 -07:00
interleave.td [TableGen] Fix bug in !interleave operator 2020-12-28 12:17:24 -05:00
intrin-side-effects.td [Attributes] Make intrinsic attribute generation more flexible (NFC) 2022-10-12 10:56:01 +02:00
intrinsic-long-name.td Reland [IR] Intrinsics default attributes and opt-out flag 2020-08-26 11:37:59 +02:00
intrinsic-pointer-to-any.td [ValueTypes] Define MVTs for v128i2/v64i4 as well as i2 and i4. 2022-06-02 00:49:11 +00:00
intrinsic-struct.td Reland [IR] Intrinsics default attributes and opt-out flag 2020-08-26 11:37:59 +02:00
intrinsic-varargs.td Reland [IR] Intrinsics default attributes and opt-out flag 2020-08-26 11:37:59 +02:00
isa.td [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
lisp.td
list-element-bitref.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
listconcat.td
listpaste.td
listsplat.td
lit.local.cfg
math.td [TableGen] Add div bang operator 2022-09-30 12:08:28 -07:00
name-resolution-consistency.td
nested-comment.td
nul-char.td [TableGen] Make the NUL character invalid in .td files 2021-05-13 10:17:45 -04:00
paste-reserved.td [TableGen] Add true and false literals to represent booleans 2020-11-05 09:07:21 -05:00
pr8330.td [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
predicate-patfags.td
prep-diag1.td
prep-diag2.td
prep-diag3.td
prep-diag4.td
prep-diag5.td
prep-diag6.td
prep-diag7.td
prep-diag8.td
prep-diag9.td
prep-diag10.td
prep-diag11-include.inc
prep-diag11.td
prep-diag12-include.inc
prep-diag12.td
prep-diag13.td
prep-diag14.td
prep-ifndef-diag-1.td
prep-ifndef-diag-2.td
prep-ifndef.td
prep-region-include.inc
prep-region-processing.td
pset-enum.td
pseudo-inst-expansion.td [TableGen] Allow BitsInit to init integer in pseudo expansion 2021-03-23 11:50:55 +07:00
range-lists.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
rc-weight-override.td
searchabletables-intrinsic.td Reland [IR] Intrinsics default attributes and opt-out flag 2020-08-26 11:37:59 +02:00
self-reference-recursion.td
self-reference-typeerror.td [TableGen] Improve handling of template arguments 2021-03-19 09:57:53 -04:00
self-reference.td [TableGen] Fix anonymous record self-reference in foreach and multiclass 2021-02-01 10:59:07 -05:00
simplify-patfrag.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
size.td [TableGen] Enhance !empty and !size to handle strings and DAGs. 2020-10-19 09:22:20 -04:00
spurious-semi.td [TableGen] Improve error message for semicolon after braced body. 2021-01-12 09:38:05 -05:00
strconcat.td
subst.td
subst2.td
substr.td [TableGen] Add the !substr() bang operator 2020-12-23 10:59:33 -05:00
template-arg-dependency.td
template-args.td [TableGen] Report an error message on a missing comma 2021-04-09 18:48:49 +01:00
true-false.td [TableGen] Add true and false literals to represent booleans 2020-11-05 09:07:21 -05:00
trydecode-emission.td
trydecode-emission2.td
trydecode-emission3.td Update TableGen test files to use the new '...' range punctuation. 2020-09-12 16:26:32 -04:00
unsetop.td
unterminated-c-comment-include.inc
unterminated-c-comment.td
unterminated-code-block-include.inc
unterminated-code-block.td [TableGen] Eliminate the 'code' type 2020-12-03 10:19:11 -05:00
usevalname.td
warn-unused-template-arg.td [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00