summaryrefslogtreecommitdiff
path: root/docs/CommandGuide/tblgen.rst
blob: 2d191676d9f0dcf8362d3164c79dcc8417ad632f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
tblgen - Target Description To C++ Code Generator
=================================================


SYNOPSIS
--------


**tblgen** [*options*] [*filename*]


DESCRIPTION
-----------


**tblgen** translates from target description (.td) files into C++ code that can
be included in the definition of an LLVM target library. Most users of LLVM will
not need to use this program. It is only for assisting with writing an LLVM
target backend.

The input and output of **tblgen** is beyond the scope of this short
introduction. Please see the *CodeGeneration* page in the LLVM documentation.

The *filename* argument specifies the name of a Target Description (.td) file
to read as input.


OPTIONS
-------



**-help**

 Print a summary of command line options.



**-o** *filename*

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



**-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.



**-asmparsernum** *N*

 Make -gen-asm-parser emit assembly writer number *N*.



**-asmwriternum** *N*

 Make -gen-asm-writer emit assembly writer number *N*.



**-class** *class Name*

 Print the enumeration list for this class.



**-print-records**

 Print all records to standard output (default).



**-print-enums**

 Print enumeration values for a class



**-print-sets**

 Print expanded sets for testing DAG exprs.



**-gen-emitter**

 Generate machine code emitter.



**-gen-register-info**

 Generate registers and register classes info.



**-gen-instr-info**

 Generate instruction descriptions.



**-gen-asm-writer**

 Generate the assembly writer.



**-gen-disassembler**

 Generate disassembler.



**-gen-pseudo-lowering**

 Generate pseudo instruction lowering.



**-gen-dag-isel**

 Generate a DAG (Directed Acycle Graph) instruction selector.



**-gen-asm-matcher**

 Generate assembly instruction matcher.



**-gen-dfa-packetizer**

 Generate DFA Packetizer for VLIW targets.



**-gen-fast-isel**

 Generate a "fast" instruction selector.



**-gen-subtarget**

 Generate subtarget enumerations.



**-gen-intrinsic**

 Generate intrinsic information.



**-gen-tgt-intrinsic**

 Generate target intrinsic information.



**-gen-enhanced-disassembly-info**

 Generate enhanced disassembly info.



**-version**

 Show the version number of this program.




EXIT STATUS
-----------


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