1TBLGEN(1)                            LLVM                            TBLGEN(1)
2
3
4

NAME

6       tblgen - Description to C++ Code
7

SYNOPSIS

9       clang-tblgen [options] [filename]
10
11       lldb-tblgen [options] [filename]
12
13       llvm-tblgen [options] [filename]
14
15       mlir-tblgen [options] [filename]
16

DESCRIPTION

18       *-tblgen  is  a  family  of programs that translates target description
19       (.td) files into C++ code and other output formats. Most users of  LLVM
20       will not need to use this program. It is used only for writing parts of
21       the compiler, debugger, and LLVM target backends.
22
23       The details of the input and output of the *-tblgen programs is  beyond
24       the  scope of this short introduction; please see the TableGen Overview
25       for an introduction and for references  to  additional  TableGen  docu‐
26       ments.
27
28       The  filename  argument  specifies  the  name of the Target Description
29       (.td) file that TableGen processes.
30

OPTIONS

32   General Options
33       -help  Print a description of the command line options.
34
35       -help-list
36              Print a description of the command line options in a simple list
37              format.
38
39       -D=macroname
40              Specify  the name of a macro to be defined. The name is defined,
41              but it has no particular value.
42
43       -d=filename
44              Specify the name of the dependency filename.
45
46       -debug Enable debug output.
47
48       -dump-json
49              Print a JSON representation of all records, suitable for further
50              automated processing.
51
52       -I directory
53              Specify  where to find other target description files for inclu‐
54              sion.  The directory value should be a full or partial path to a
55              directory that contains target description files.
56
57       -null-backend
58              Parse the source files and build the records, but do not run any
59              backend. This is useful for timing the frontend.
60
61       -o filename
62              Specify the output file name.  If filename is -,  then  *-tblgen
63              sends its output to standard output.
64
65       -print-records
66              Print  all classes and records to standard output (default back‐
67              end option).
68
69       -print-detailed-records
70              Print a detailed report of all global  variables,  classes,  and
71              records to standard output.
72
73       -stats Print a report with any statistics collected by the backend.
74
75       -time-phases
76              Time the parser and backend phases and print a report.
77
78       -version
79              Show the version number of the program.
80
81       -write-if-changed
82              Write the output file only if it is new or has changed.
83
84   clang-tblgen Options
85       -gen-clang-attr-classes
86              Generate Clang attribute clases.
87
88       -gen-clang-attr-parser-string-switches
89              Generate all parser-related attribute string switches.
90
91       -gen-clang-attr-subject-match-rules-parser-string-switches
92              Generate  all parser-related attribute subject match rule string
93              switches.
94
95       -gen-clang-attr-impl
96              Generate Clang attribute implementations.
97
98       -gen-clang-attr-list"
99              Generate a Clang attribute list.
100
101       -gen-clang-attr-subject-match-rule-list
102              Generate a Clang attribute subject match rule list.
103
104       -gen-clang-attr-pch-read
105              Generate Clang PCH attribute reader.
106
107       -gen-clang-attr-pch-write
108              Generate Clang PCH attribute writer.
109
110       -gen-clang-attr-has-attribute-impl
111              Generate a Clang attribute spelling list.
112
113       -gen-clang-attr-spelling-index
114              Generate a Clang attribute spelling index.
115
116       -gen-clang-attr-ast-visitor
117              Generate a recursive AST visitor for Clang attributes.
118
119       -gen-clang-attr-template-instantiate
120              Generate a Clang template instantiate code.
121
122       -gen-clang-attr-parsed-attr-list
123              Generate a Clang parsed attribute list.
124
125       -gen-clang-attr-parsed-attr-impl
126              Generate the Clang parsed attribute helpers.
127
128       -gen-clang-attr-parsed-attr-kinds
129              Generate a Clang parsed attribute kinds.
130
131       -gen-clang-attr-text-node-dump
132              Generate Clang attribute text node dumper.
133
134       -gen-clang-attr-node-traverse
135              Generate Clang attribute traverser.
136
137       -gen-clang-diags-defs
138              Generate Clang diagnostics definitions.
139
140       -clang-component component
141              Only use warnings from specified component.
142
143       -gen-clang-diag-groups
144              Generate Clang diagnostic groups.
145
146       -gen-clang-diags-index-name
147              Generate Clang diagnostic name index.
148
149       -gen-clang-basic-reader
150              Generate Clang BasicReader classes.
151
152       -gen-clang-basic-writer
153              Generate Clang BasicWriter classes.
154
155       -gen-clang-comment-nodes
156              Generate Clang AST comment nodes.
157
158       -gen-clang-decl-nodes
159              Generate Clang AST declaration nodes.
160
161       -gen-clang-stmt-nodes
162              Generate Clang AST statement nodes.
163
164       -gen-clang-type-nodes
165              Generate Clang AST type nodes.
166
167       -gen-clang-type-reader
168              Generate Clang AbstractTypeReader class.
169
170       -gen-clang-type-writer
171              Generate Clang AbstractTypeWriter class.
172
173       -gen-clang-opcodes
174              Generate Clang constexpr interpreter opcodes.
175
176       -gen-clang-sa-checkers
177              Generate Clang static analyzer checkers.
178
179       -gen-clang-comment-html-tags
180              Generate efficient matchers for HTML tag names that are used  in
181              documentation comments.
182
183       -gen-clang-comment-html-tags-properties
184              Generate efficient matchers for HTML tag properties.
185
186       -gen-clang-comment-html-named-character-references
187              Generate  function  to  translate  named character references to
188              UTF-8 sequences.
189
190       -gen-clang-comment-command-info
191              Generate command properties for commands that are used in  docu‐
192              mentation comments.
193
194       -gen-clang-comment-command-list
195              Generate  list  of  commands that are used in documentation com‐
196              ments.
197
198       -gen-clang-opencl-builtins
199              Generate OpenCL builtin declaration handlers.
200
201       -gen-arm-neon
202              Generate arm_neon.h for Clang.
203
204       -gen-arm-fp16
205              Generate arm_fp16.h for Clang.
206
207       -gen-arm-bf16
208              Generate arm_bf16.h for Clang.
209
210       -gen-arm-neon-sema
211              Generate ARM NEON sema support for Clang.
212
213       -gen-arm-neon-test
214              Generate ARM NEON tests for Clang.
215
216       -gen-arm-sve-header
217              Generate arm_sve.h for Clang.
218
219       -gen-arm-sve-builtins
220              Generate arm_sve_builtins.inc for Clang.
221
222       -gen-arm-sve-builtin-codegen
223              Generate arm_sve_builtin_cg_map.inc for Clang.
224
225       -gen-arm-sve-typeflags
226              Generate arm_sve_typeflags.inc for Clang.
227
228       -gen-arm-sve-sema-rangechecks
229              Generate arm_sve_sema_rangechecks.inc for Clang.
230
231       -gen-arm-mve-header
232              Generate arm_mve.h for Clang.
233
234       -gen-arm-mve-builtin-def
235              Generate ARM MVE builtin definitions for Clang.
236
237       -gen-arm-mve-builtin-sema
238              Generate ARM MVE builtin sema checks for Clang.
239
240       -gen-arm-mve-builtin-codegen
241              Generate ARM MVE builtin code-generator for Clang.
242
243       -gen-arm-mve-builtin-aliases
244              Generate list of valid ARM MVE builtin aliases for Clang.
245
246       -gen-arm-cde-header
247              Generate arm_cde.h for Clang.
248
249       -gen-arm-cde-builtin-def
250              Generate ARM CDE builtin definitions for Clang.
251
252       -gen-arm-cde-builtin-sema
253              Generate ARM CDE builtin sema checks for Clang.
254
255       -gen-arm-cde-builtin-codegen
256              Generate ARM CDE builtin code-generator for Clang.
257
258       -gen-arm-cde-builtin-aliases
259              Generate list of valid ARM CDE builtin aliases for Clang.
260
261       -gen-riscv-vector-header
262              Generate riscv_vector.h for Clang.
263
264       -gen-riscv-vector-builtins
265              Generate riscv_vector_builtins.inc for Clang.
266
267       -gen-riscv-vector-builtin-codegen
268              Generate riscv_vector_builtin_cg.inc for Clang.
269
270       -gen-attr-docs
271              Generate attribute documentation.
272
273       -gen-diag-docs
274              Generate diagnostic documentation.
275
276       -gen-opt-docs
277              Generate option documentation.
278
279       -gen-clang-data-collectors
280              Generate data collectors for AST nodes.
281
282       -gen-clang-test-pragma-attribute-supported-attributes
283              Generate a list of attributes supported by #pragma Clang  attri‐
284              bute for testing purposes.
285
286   lldb-tblgen Options
287       gen-lldb-option-defs
288              Generate lldb OptionDefinition values.
289
290       gen-lldb-property-defs
291              Generate lldb PropertyDefinition values.
292
293       gen-lldb-property-enum-defs
294              Generate lldb PropertyDefinition enum values.
295
296   llvm-tblgen Options
297       -gen-asm-matcher
298              Generate assembly instruction matcher.
299
300       -match-prefix=prefix
301              Make  -gen-asm-matcher  match  only  instructions with the given
302              prefix.
303
304       -gen-asm-parser
305              Generate assembly instruction parser.
306
307       -asmparsernum=n
308              Make -gen-asm-parser emit assembly parser number n.
309
310       -gen-asm-writer
311              Generate assembly writer.
312
313       -asmwriternum=n
314              Make -gen-asm-writer emit assembly writer number n.
315
316       -gen-attrs
317              Generate attributes.
318
319       -gen-automata
320              Generate generic automata.
321
322       -gen-callingconv
323              Generate calling convention descriptions.
324
325       -gen-compress-inst-emitter
326              Generate RISC-V compressed instructions.
327
328       -gen-ctags
329              Generate ctags-compatible index.
330
331       -gen-dag-isel
332              Generate a DAG (directed acyclic graph) instruction selector.
333
334       -instrument-coverage
335              Make -gen-dag-isel generate tables to help identify the patterns
336              matched.
337
338       -omit-comments
339              Make -gen-dag-isel omit comments. The default is false.
340
341       -gen-dfa-packetizer
342              Generate DFA Packetizer for VLIW targets.
343
344       -gen-directive-decl
345              Generate directive related declaration code (header file).
346
347       -gen-directive-gen
348              Generate directive related implementation code part.
349
350       -gen-directive-impl
351              Generate directive related implementation code.
352
353       -gen-disassembler
354              Generate disassembler.
355
356       -gen-emitter
357              Generate machine code emitter.
358
359       -gen-exegesis
360              Generate llvm-exegesis tables.
361
362       -gen-fast-isel
363              Generate a "fast" instruction selector.
364
365       -gen-global-isel
366              Generate GlobalISel selector.
367
368       -gisel-coverage-file=filename
369              Specify the file from which to retrieve coverage information.
370
371       -instrument-gisel-coverage
372              Make -gen-global-isel generate coverage instrumentation.
373
374       -optimize-match-table
375              Make -gen-global-isel generate an optimized version of the match
376              table.
377
378       -warn-on-skipped-patterns
379              Make -gen-global-isel explain why a pattern was skipped for  in‐
380              clusion.
381
382       -gen-global-isel-combiner
383              Generate GlobalISel combiner.
384
385       -combiners=list
386              Make -gen-global-isel-combiner emit the specified combiners.
387
388       -gicombiner-show-expansions
389              Make  -gen-global-isel-combiner use C++ comments to indicate oc‐
390              currences of code expansion.
391
392       -gicombiner-stop-after-build
393              Make -gen-global-isel-combiner stop  processing  after  building
394              the match tree.
395
396       -gicombiner-stop-after-parse
397              Make  -gen-global-isel-combiner  stop  processing  after parsing
398              rules and dump state.
399
400       -gen-instr-info
401              Generate instruction descriptions.
402
403       -gen-instr-docs
404              Generate instruction documentation.
405
406       -gen-intrinsic-enums
407              Generate intrinsic enums.
408
409       -intrinsic-prefix=prefix
410              Make -gen-intrinsic-enums generate intrinsics with  this  target
411              prefix.
412
413       -gen-intrinsic-impl
414              Generate intrinsic information.
415
416       -gen-opt-parser-defs
417              Generate options definitions.
418
419       -gen-opt-rst
420              Generate option RST.
421
422       -gen-pseudo-lowering
423              Generate pseudo instruction lowering.
424
425       -gen-register-bank
426              Generate register bank descriptions.
427
428       -gen-register-info
429              Generate registers and register classes info.
430
431       -register-info-debug
432              Make -gen-register-info dump register information for debugging.
433
434       -gen-searchable-tables
435              Generate  generic searchable tables. See TableGen BackEnds for a
436              detailed description.
437
438       -gen-subtarget
439              Generate subtarget enumerations.
440
441       -gen-x86-EVEX2VEX-tables
442              Generate X86 EVEX to VEX compress tables.
443
444       -gen-x86-fold-tables
445              Generate X86 fold tables.
446
447       -long-string-literals
448              When emitting large string tables, prefer string  literals  over
449              comma-separated  char  literals.  This  can be a readability and
450              compile-time performance win, but upsets some compilers.
451
452       -print-enums
453              Print enumeration values for a class.
454
455       -class=classname
456              Make -print-enums print the enumeration list for  the  specified
457              class.
458
459       -print-sets
460              Print expanded sets for testing DAG exprs.
461
462   mlir-tblgen Options
463       -gen-avail-interface-decls
464              Generate availability interface declarations.
465
466       -gen-avail-interface-defs
467              Generate op interface definitions.
468
469       -gen-dialect-doc
470              Generate dialect documentation.
471
472       -dialect
473              The dialect to generate.
474
475       -gen-directive-decl
476              Generate declarations for directives (OpenMP, etc.).
477
478       -gen-enum-decls
479              Generate enum utility declarations.
480
481       -gen-enum-defs
482              Generate enum utility definitions.
483
484       -gen-enum-from-llvmir-conversions
485              Generate conversions of EnumAttrs from LLVM IR.
486
487       -gen-enum-to-llvmir-conversions
488              Generate conversions of EnumAttrs to LLVM IR.
489
490       -gen-llvmir-conversions
491              Generate LLVM IR conversions.
492
493       -gen-llvmir-intrinsics
494              Generate LLVM IR intrinsics.
495
496       -llvmir-intrinsics-filter
497              Only  keep  the intrinsics with the specified substring in their
498              record name.
499
500       -dialect-opclass-base
501              The base class for the ops in the dialect we are to emit.
502
503       -gen-op-decls
504              Generate operation declarations.
505
506       -gen-op-defs
507              Generate operation definitions.
508
509       -asmformat-error-is-fatal
510              Emit a fatal error if format parsing fails.
511
512       -op-exclude-regex
513              Regular expression of name of  ops  to  exclude  (no  filter  if
514              empty).
515
516       -op-include-regex
517              Regular  expression  of  name  of  ops  to include (no filter if
518              empty).
519
520       -gen-op-doc
521              Generate operation documentation.
522
523       -gen-pass-decls
524              Generate operation documentation.
525
526       -name namestring
527              The name of this group of passes.
528
529       -gen-pass-doc
530              Generate pass documentation.
531
532       -gen-rewriters
533              Generate pattern rewriters.
534
535       -gen-spirv-avail-impls
536              Generate SPIR-V operation utility definitions.
537
538       -gen-spirv-capability-implication
539              Generate utility function to return implied capabilities  for  a
540              given capability.
541
542       -gen-spirv-enum-avail-decls
543              Generate SPIR-V enum availability declarations.
544
545       -gen-spirv-enum-avail-defs
546              Generate SPIR-V enum availability definitions.
547
548       -gen-spirv-op-utils
549              Generate SPIR-V operation utility definitions.
550
551       -gen-spirv-serialization
552              Generate SPIR-V (de)serialization utilities and functions.
553
554       -gen-struct-attr-decls
555              Generate struct utility declarations.
556
557       -gen-struct-attr-defs
558              Generate struct utility definitions.
559
560       -gen-typedef-decls
561              Generate TypeDef declarations.
562
563       -gen-typedef-defs
564              Generate TypeDef definitions.
565
566       -typedefs-dialect name
567              Generate types for this dialect.
568

EXIT STATUS

570       If  *-tblgen succeeds, it will exit with 0.  Otherwise, if an error oc‐
571       curs, it will exit with a non-zero value.
572

AUTHOR

574       Maintained by the LLVM Team (https://llvm.org/).
575
577       2003-2023, LLVM Project
578
579
580
581
58215                                2023-07-20                         TBLGEN(1)
Impressum