tblgen - Description to C++ CodeΒΆ

SYNOPSISΒΆ

clang-tblgen [options] [filename]

lldb-tblgen [options] [filename]

llvm-tblgen [options] [filename]

mlir-tblgen [options] [filename]

DESCRIPTIONΒΆ

*-tblgen is a family of programs that translates target description (.td) files into C++ code and other output formats. Most users of LLVM will not need to use this program. It is used only for writing parts of the compiler, debugger, and LLVM target backends.

The details of the input and output of the *-tblgen programs is beyond the scope of this short introduction; please see the TableGen Overview for an introduction and for references to additional TableGen documents.

The filename argument specifies the name of the Target Description (.td) file that TableGen processes.

OPTIONSΒΆ

General OptionsΒΆ

-helpΒΆ

Print a description of the command line options.

-help-listΒΆ

Print a description of the command line options in a simple list format.

-D=macronameΒΆ

Specify the name of a macro to be defined. The name is defined, but it has no particular value.

-d=filenameΒΆ

Specify the name of the dependency filename.

-debugΒΆ

Enable debug output.

-dump-jsonΒΆ

Print a JSON representation of all records, suitable for further automated processing.

-I directoryΒΆ

Specify where to find other target description files for inclusion. The directory value should be a full or partial path to a directory that contains target description files.

-null-backendΒΆ

Parse the source files and build the records, but do not run any backend. This is useful for timing the frontend.

-o filenameΒΆ

Specify the output file name. If filename is -, then *-tblgen sends its output to standard output.

-print-recordsΒΆ

Print all classes and records to standard output (default backend option).

-print-detailed-recordsΒΆ

Print a detailed report of all global variables, classes, and records to standard output.

-statsΒΆ

Print a report with any statistics collected by the backend.

-time-phasesΒΆ

Time the parser and backend phases and print a report.

-versionΒΆ

Show the version number of the program.

-write-if-changedΒΆ

Write the output file only if it is new or has changed.

clang-tblgen OptionsΒΆ

-gen-clang-attr-classesΒΆ

Generate Clang attribute classes.

-gen-clang-attr-parser-string-switchesΒΆ

Generate all parser-related attribute string switches.

-gen-clang-attr-subject-match-rules-parser-string-switchesΒΆ

Generate all parser-related attribute subject match rule string switches.

-gen-clang-attr-implΒΆ

Generate Clang attribute implementations.

-gen-clang-attr-list"ΒΆ

Generate a Clang attribute list.

-gen-clang-attr-subject-match-rule-listΒΆ

Generate a Clang attribute subject match rule list.

-gen-clang-attr-pch-readΒΆ

Generate Clang PCH attribute reader.

-gen-clang-attr-pch-writeΒΆ

Generate Clang PCH attribute writer.

-gen-clang-attr-has-attribute-implΒΆ

Generate a Clang attribute spelling list.

-gen-clang-attr-spelling-indexΒΆ

Generate a Clang attribute spelling index.

-gen-clang-attr-ast-visitorΒΆ

Generate a recursive AST visitor for Clang attributes.

-gen-clang-attr-template-instantiateΒΆ

Generate a Clang template instantiate code.

-gen-clang-attr-parsed-attr-listΒΆ

Generate a Clang parsed attribute list.

-gen-clang-attr-parsed-attr-implΒΆ

Generate the Clang parsed attribute helpers.

-gen-clang-attr-parsed-attr-kindsΒΆ

Generate a Clang parsed attribute kinds.

-gen-clang-attr-text-node-dumpΒΆ

Generate Clang attribute text node dumper.

-gen-clang-attr-node-traverseΒΆ

Generate Clang attribute traverser.

-gen-clang-diags-defsΒΆ

Generate Clang diagnostics definitions.

-clang-component componentΒΆ

Only use warnings from specified component.

-gen-clang-diag-groupsΒΆ

Generate Clang diagnostic groups.

-gen-clang-diags-index-nameΒΆ

Generate Clang diagnostic name index.

-gen-clang-basic-readerΒΆ

Generate Clang BasicReader classes.

-gen-clang-basic-writerΒΆ

Generate Clang BasicWriter classes.

-gen-clang-comment-nodesΒΆ

Generate Clang AST comment nodes.

-gen-clang-decl-nodesΒΆ

Generate Clang AST declaration nodes.

-gen-clang-stmt-nodesΒΆ

Generate Clang AST statement nodes.

-gen-clang-type-nodesΒΆ

Generate Clang AST type nodes.

-gen-clang-type-readerΒΆ

Generate Clang AbstractTypeReader class.

-gen-clang-type-writerΒΆ

Generate Clang AbstractTypeWriter class.

-gen-clang-opcodesΒΆ

Generate Clang constexpr interpreter opcodes.

-gen-clang-sa-checkersΒΆ

Generate Clang static analyzer checkers.

-gen-clang-comment-html-tagsΒΆ

Generate efficient matchers for HTML tag names that are used in documentation comments.

-gen-clang-comment-html-tags-propertiesΒΆ

Generate efficient matchers for HTML tag properties.

-gen-clang-comment-html-named-character-referencesΒΆ

Generate function to translate named character references to UTF-8 sequences.

-gen-clang-comment-command-infoΒΆ

Generate command properties for commands that are used in documentation comments.

-gen-clang-comment-command-listΒΆ

Generate list of commands that are used in documentation comments.

-gen-clang-opencl-builtinsΒΆ

Generate OpenCL builtin declaration handlers.

-gen-arm-neonΒΆ

Generate arm_neon.h for Clang.

-gen-arm-fp16ΒΆ

Generate arm_fp16.h for Clang.

-gen-arm-bf16ΒΆ

Generate arm_bf16.h for Clang.

-gen-arm-neon-semaΒΆ

Generate ARM NEON sema support for Clang.

-gen-arm-neon-testΒΆ

Generate ARM NEON tests for Clang.

-gen-arm-immcheck-typesΒΆ

Generate arm_immcheck_types.inc for Clang.

-gen-arm-sve-headerΒΆ

Generate arm_sve.h for Clang.

-gen-arm-sve-builtinsΒΆ

Generate arm_sve_builtins.inc for Clang.

-gen-arm-sve-builtin-codegenΒΆ

Generate arm_sve_builtin_cg_map.inc for Clang.

-gen-arm-sve-typeflagsΒΆ

Generate arm_sve_typeflags.inc for Clang.

-gen-arm-sve-sema-rangechecksΒΆ

Generate arm_sve_sema_rangechecks.inc for Clang.

-gen-arm-mve-headerΒΆ

Generate arm_mve.h for Clang.

-gen-arm-mve-builtin-defΒΆ

Generate ARM MVE builtin definitions for Clang.

-gen-arm-mve-builtin-semaΒΆ

Generate ARM MVE builtin sema checks for Clang.

-gen-arm-mve-builtin-codegenΒΆ

Generate ARM MVE builtin code-generator for Clang.

-gen-arm-mve-builtin-aliasesΒΆ

Generate list of valid ARM MVE builtin aliases for Clang.

-gen-arm-cde-headerΒΆ

Generate arm_cde.h for Clang.

-gen-arm-cde-builtin-defΒΆ

Generate ARM CDE builtin definitions for Clang.

-gen-arm-cde-builtin-semaΒΆ

Generate ARM CDE builtin sema checks for Clang.

-gen-arm-cde-builtin-codegenΒΆ

Generate ARM CDE builtin code-generator for Clang.

-gen-arm-cde-builtin-aliasesΒΆ

Generate list of valid ARM CDE builtin aliases for Clang.

-gen-riscv-vector-headerΒΆ

Generate riscv_vector.h for Clang.

-gen-riscv-vector-builtinsΒΆ

Generate riscv_vector_builtins.inc for Clang.

-gen-riscv-vector-builtin-codegenΒΆ

Generate riscv_vector_builtin_cg.inc for Clang.

-gen-riscv-sifive-vector-builtinsΒΆ

Generate riscv_sifive_vector_builtins.inc for Clang.

-gen-riscv-sifive-vector-builtin-codegenΒΆ

Generate riscv_sifive_vector_builtin_cg.inc for Clang.

-gen-attr-docsΒΆ

Generate attribute documentation.

-gen-diag-docsΒΆ

Generate diagnostic documentation.

-gen-opt-docsΒΆ

Generate option documentation.

-gen-clang-data-collectorsΒΆ

Generate data collectors for AST nodes.

-gen-clang-test-pragma-attribute-supported-attributesΒΆ

Generate a list of attributes supported by #pragma Clang attribute for testing purposes.

lldb-tblgen OptionsΒΆ

gen-lldb-option-defsΒΆ

Generate lldb OptionDefinition values.

gen-lldb-property-defsΒΆ

Generate lldb PropertyDefinition values.

gen-lldb-property-enum-defsΒΆ

Generate lldb PropertyDefinition enum values.

llvm-tblgen OptionsΒΆ

-gen-asm-matcherΒΆ

Generate assembly instruction matcher.

-match-prefix=prefixΒΆ

Make -gen-asm-matcher match only instructions with the given prefix.

-gen-asm-parserΒΆ

Generate assembly instruction parser.

-asmparsernum=nΒΆ

Make -gen-asm-parser emit assembly parser number n.

-gen-asm-writerΒΆ

Generate assembly writer.

-asmwriternum=nΒΆ

Make -gen-asm-writer emit assembly writer number n.

-gen-attrsΒΆ

Generate attributes.

-gen-automataΒΆ

Generate generic automata.

-gen-callingconvΒΆ

Generate calling convention descriptions.

-gen-compress-inst-emitterΒΆ

Generate RISC-V compressed instructions.

-gen-ctagsΒΆ

Generate ctags-compatible index.

-gen-dag-iselΒΆ

Generate a DAG (directed acyclic graph) instruction selector.

-instrument-coverageΒΆ

Make -gen-dag-isel generate tables to help identify the patterns matched.

-omit-commentsΒΆ

Make -gen-dag-isel omit comments. The default is false.

-gen-dfa-packetizerΒΆ

Generate DFA Packetizer for VLIW targets.

-gen-directive-declΒΆ

Generate directive related declaration code (header file).

-gen-directive-genΒΆ

Generate directive related implementation code part.

-gen-directive-implΒΆ

Generate directive related implementation code.

-gen-disassemblerΒΆ

Generate disassembler.

-gen-emitterΒΆ

Generate machine code emitter.

-gen-exegesisΒΆ

Generate llvm-exegesis tables.

-gen-fast-iselΒΆ

Generate a β€œfast” instruction selector.

-gen-global-iselΒΆ

Generate GlobalISel selector.

-gisel-coverage-file=filenameΒΆ

Specify the file from which to retrieve coverage information.

-instrument-gisel-coverageΒΆ

Make -gen-global-isel generate coverage instrumentation.

-optimize-match-tableΒΆ

Make -gen-global-isel generate an optimized version of the match table.

-warn-on-skipped-patternsΒΆ

Make -gen-global-isel explain why a pattern was skipped for inclusion.

-gen-global-isel-combinerΒΆ

Generate GlobalISel combiner.

-combiners=listΒΆ

Make -gen-global-isel-combiner emit the specified combiners.

-gicombiner-debug-cxxpredsΒΆ

Add debug comments to all C++ predicates emitted by -gen-global-isel-combiner

-gicombiner-stop-after-parseΒΆ

Make -gen-global-isel-combiner stop processing after parsing rules and dump state.

-gen-instr-infoΒΆ

Generate instruction descriptions.

-gen-instr-docsΒΆ

Generate instruction documentation.

-gen-intrinsic-enumsΒΆ

Generate intrinsic enums.

-intrinsic-prefix=prefixΒΆ

Make -gen-intrinsic-enums generate intrinsics with this target prefix.

-gen-intrinsic-implΒΆ

Generate intrinsic information.

-gen-opt-parser-defsΒΆ

Generate options definitions.

-gen-opt-rstΒΆ

Generate option RST.

-gen-pseudo-loweringΒΆ

Generate pseudo instruction lowering.

-gen-register-bankΒΆ

Generate register bank descriptions.

-gen-register-infoΒΆ

Generate registers and register classes info.

-register-info-debugΒΆ

Make -gen-register-info dump register information for debugging.

-gen-searchable-tablesΒΆ

Generate generic searchable tables. See TableGen BackEnds for a detailed description.

-gen-subtargetΒΆ

Generate subtarget enumerations.

-gen-x86-EVEX2VEX-tablesΒΆ

Generate X86 EVEX to VEX compress tables.

-gen-x86-fold-tablesΒΆ

Generate X86 fold tables.

-long-string-literalsΒΆ

When emitting large string tables, prefer string literals over comma-separated char literals. This can be a readability and compile-time performance win, but upsets some compilers.

-print-enumsΒΆ

Print enumeration values for a class.

-class=classnameΒΆ

Make -print-enums print the enumeration list for the specified class.

-print-setsΒΆ

Print expanded sets for testing DAG exprs.

mlir-tblgen OptionsΒΆ

-gen-avail-interface-declsΒΆ

Generate availability interface declarations.

-gen-avail-interface-defsΒΆ

Generate op interface definitions.

-gen-dialect-docΒΆ

Generate dialect documentation.

-dialectΒΆ

The dialect to generate.

-gen-directive-declΒΆ

Generate declarations for directives (OpenMP, etc.).

-gen-enum-declsΒΆ

Generate enum utility declarations.

-gen-enum-defsΒΆ

Generate enum utility definitions.

-gen-enum-from-llvmir-conversionsΒΆ

Generate conversions of EnumAttrs from LLVM IR.

-gen-enum-to-llvmir-conversionsΒΆ

Generate conversions of EnumAttrs to LLVM IR.

-gen-llvmir-conversionsΒΆ

Generate LLVM IR conversions.

-gen-llvmir-intrinsicsΒΆ

Generate LLVM IR intrinsics.

-llvmir-intrinsics-filterΒΆ

Only keep the intrinsics with the specified substring in their record name.

-dialect-opclass-baseΒΆ

The base class for the ops in the dialect we are to emit.

-gen-op-declsΒΆ

Generate operation declarations.

-gen-op-defsΒΆ

Generate operation definitions.

-asmformat-error-is-fatalΒΆ

Emit a fatal error if format parsing fails.

-op-exclude-regexΒΆ

Regular expression of name of ops to exclude (no filter if empty).

-op-include-regexΒΆ

Regular expression of name of ops to include (no filter if empty).

-gen-op-docΒΆ

Generate operation documentation.

-gen-pass-declsΒΆ

Generate operation documentation.

-name namestringΒΆ

The name of this group of passes.

-gen-pass-docΒΆ

Generate pass documentation.

-gen-rewritersΒΆ

Generate pattern rewriters.

-gen-spirv-avail-implsΒΆ

Generate SPIR-V operation utility definitions.

-gen-spirv-capability-implicationΒΆ

Generate utility function to return implied capabilities for a given capability.

-gen-spirv-enum-avail-declsΒΆ

Generate SPIR-V enum availability declarations.

-gen-spirv-enum-avail-defsΒΆ

Generate SPIR-V enum availability definitions.

-gen-spirv-op-utilsΒΆ

Generate SPIR-V operation utility definitions.

-gen-spirv-serializationΒΆ

Generate SPIR-V (de)serialization utilities and functions.

-gen-struct-attr-declsΒΆ

Generate struct utility declarations.

-gen-struct-attr-defsΒΆ

Generate struct utility definitions.

-gen-typedef-declsΒΆ

Generate TypeDef declarations.

-gen-typedef-defsΒΆ

Generate TypeDef definitions.

-typedefs-dialect nameΒΆ

Generate types for this dialect.

EXIT STATUSΒΆ

If *-tblgen succeeds, it will exit with 0. Otherwise, if an error occurs, it will exit with a non-zero value.