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