1 tblgen - Target Description To C++ Code Generator
2 =================================================
7 :program:`tblgen` [*options*] [*filename*]
12 :program:`tblgen` translates from target description (``.td``) files into C++
13 code that can be included in the definition of an LLVM target library. Most
14 users of LLVM will not need to use this program. It is only for assisting with
15 writing an LLVM target backend.
17 The input and output of :program:`tblgen` is beyond the scope of this short
18 introduction; please see the :doc:`introduction to TableGen
21 The *filename* argument specifies the name of a Target Description (``.td``)
22 file to read as input.
31 Print a summary of command line options.
33 .. option:: -o filename
35 Specify the output file name. If ``filename`` is ``-``, then
36 :program:`tblgen` sends its output to standard output.
38 .. option:: -I directory
40 Specify where to find other target description files for inclusion. The
41 ``directory`` value should be a full or partial path to a directory that
42 contains target description files.
44 .. option:: -asmparsernum N
46 Make -gen-asm-parser emit assembly writer number ``N``.
48 .. option:: -asmwriternum N
50 Make -gen-asm-writer emit assembly writer number ``N``.
52 .. option:: -class className
54 Print the enumeration list for this class.
56 .. option:: -print-records
58 Print all records to standard output (default).
60 .. option:: -dump-json
62 Print a JSON representation of all records, suitable for further
65 .. option:: -print-enums
67 Print enumeration values for a class.
69 .. option:: -print-sets
71 Print expanded sets for testing DAG exprs.
73 .. option:: -gen-emitter
75 Generate machine code emitter.
77 .. option:: -gen-register-info
79 Generate registers and register classes info.
81 .. option:: -gen-instr-info
83 Generate instruction descriptions.
85 .. option:: -gen-asm-writer
87 Generate the assembly writer.
89 .. option:: -gen-disassembler
91 Generate disassembler.
93 .. option:: -gen-pseudo-lowering
95 Generate pseudo instruction lowering.
97 .. option:: -gen-dag-isel
99 Generate a DAG (Directed Acycle Graph) instruction selector.
101 .. option:: -gen-asm-matcher
103 Generate assembly instruction matcher.
105 .. option:: -gen-dfa-packetizer
107 Generate DFA Packetizer for VLIW targets.
109 .. option:: -gen-fast-isel
111 Generate a "fast" instruction selector.
113 .. option:: -gen-subtarget
115 Generate subtarget enumerations.
117 .. option:: -gen-intrinsic-enums
119 Generate intrinsic enums.
121 .. option:: -gen-intrinsic-impl
123 Generate intrinsic implementation.
125 .. option:: -gen-tgt-intrinsic
127 Generate target intrinsic information.
129 .. option:: -gen-enhanced-disassembly-info
131 Generate enhanced disassembly info.
135 Show the version number of this program.
140 If :program:`tblgen` succeeds, it will exit with 0. Otherwise, if an error
141 occurs, it will exit with a non-zero value.