llvm.org GIT mirror llvm / d625452
Improving lli documentation Too many people hope lli would act as an emulator when it's actually just a tool to help prototype IR code and test the JIT compiler. This commit makes that fact explicit in the documentation It also migrates the old style bold/italic doc tags to the preferred meta tags (.. option::, :program:, etc). No errors when generating the documents, visual inspection in the HTML result doesn't show any major difference, apart from the slight style change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243401 91177308-0d34-0410-b5e6-96231b3b80d8 Renato Golin 4 years ago
1 changed file(s) with 52 addition(s) and 132 deletion(s). Raw diff Collapse all Expand all
0 lli - directly execute programs from LLVM bitcode
11 =================================================
22
3
43 SYNOPSIS
54 --------
65
7
8 **lli** [*options*] [*filename*] [*program args*]
9
6 :program:`lli` [*options*] [*filename*] [*program args*]
107
118 DESCRIPTION
129 -----------
1310
14
15 **lli** directly executes programs in LLVM bitcode format. It takes a program
16 in LLVM bitcode format and executes it using a just-in-time compiler, if one is
17 available for the current architecture, or an interpreter. **lli** takes all of
18 the same code generator options as llc|llc, but they are only effective when
19 **lli** is using the just-in-time compiler.
20
21 If *filename* is not specified, then **lli** reads the LLVM bitcode for the
11 :program:`lli` directly executes programs in LLVM bitcode format. It takes a program
12 in LLVM bitcode format and executes it using a just-in-time compiler or an
13 interpreter.
14
15 :program:`lli` is *not* an emulator. It will not execute IR of different architectures
16 and it can only interpret (or JIT-compile) for the host architecture.
17
18 The JIT compiler takes the same arguments as other tools, like :program:`llc`,
19 but they don't necessarily work for the interpreter.
20
21 If `filename` is not specified, then :program:`lli` reads the LLVM bitcode for the
2222 program from standard input.
2323
2424 The optional *args* specified on the command line are passed to the program as
2525 arguments.
2626
27
2827 GENERAL OPTIONS
2928 ---------------
3029
31
32
33 **-fake-argv0**\ =\ *executable*
30 .. option:: -fake-argv0=executable
3431
3532 Override the ``argv[0]`` value passed into the executing program.
3633
37
38
39 **-force-interpreter**\ =\ *{false,true}*
34 .. option:: -force-interpreter={false,true}
4035
4136 If set to true, use the interpreter even if a just-in-time compiler is available
4237 for this architecture. Defaults to false.
4338
44
45
46 **-help**
39 .. option:: -help
4740
4841 Print a summary of command line options.
4942
50
51
52 **-load**\ =\ *pluginfilename*
53
54 Causes **lli** to load the plugin (shared object) named *pluginfilename* and use
43 .. option:: -load=pluginfilename
44
45 Causes :program:`lli` to load the plugin (shared object) named *pluginfilename* and use
5546 it for optimization.
5647
57
58
59 **-stats**
48 .. option:: -stats
6049
6150 Print statistics from the code-generation passes. This is only meaningful for
6251 the just-in-time compiler, at present.
6352
64
65
66 **-time-passes**
53 .. option:: -time-passes
6754
6855 Record the amount of time needed for each code-generation pass and print it to
6956 standard error.
7057
71
72
73 **-version**
74
75 Print out the version of **lli** and exit without doing anything else.
76
77
78
58 .. option:: -version
59
60 Print out the version of :program:`lli` and exit without doing anything else.
7961
8062 TARGET OPTIONS
8163 --------------
8264
83
84
85 **-mtriple**\ =\ *target triple*
65 .. option:: -mtriple=target triple
8666
8767 Override the target triple specified in the input bitcode file with the
8868 specified string. This may result in a crash if you pick an
8969 architecture which is not compatible with the current system.
9070
91
92
93 **-march**\ =\ *arch*
71 .. option:: -march=arch
9472
9573 Specify the architecture for which to generate assembly, overriding the target
9674 encoded in the bitcode file. See the output of **llc -help** for a list of
9775 valid architectures. By default this is inferred from the target triple or
9876 autodetected to the current architecture.
9977
100
101
102 **-mcpu**\ =\ *cpuname*
78 .. option:: -mcpu=cpuname
10379
10480 Specify a specific chip in the current architecture to generate code for.
10581 By default this is inferred from the target triple and autodetected to
10682 the current architecture. For a list of available CPUs, use:
10783 **llvm-as < /dev/null | llc -march=xyz -mcpu=help**
10884
109
110
111 **-mattr**\ =\ *a1,+a2,-a3,...*
85 .. option:: -mattr=a1,+a2,-a3,...
11286
11387 Override or control specific attributes of the target, such as whether SIMD
11488 operations are enabled or not. The default set of attributes is set by the
11589 current CPU. For a list of available attributes, use:
11690 **llvm-as < /dev/null | llc -march=xyz -mattr=help**
11791
118
119
120
12192 FLOATING POINT OPTIONS
12293 ----------------------
12394
124
125
126 **-disable-excess-fp-precision**
95 .. option:: -disable-excess-fp-precision
12796
12897 Disable optimizations that may increase floating point precision.
12998
130
131
132 **-enable-no-infs-fp-math**
99 .. option:: -enable-no-infs-fp-math
133100
134101 Enable optimizations that assume no Inf values.
135102
136
137
138 **-enable-no-nans-fp-math**
103 .. option:: -enable-no-nans-fp-math
139104
140105 Enable optimizations that assume no NAN values.
141106
142
143
144 **-enable-unsafe-fp-math**
145
146 Causes **lli** to enable optimizations that may decrease floating point
107 .. option:: -enable-unsafe-fp-math
108
109 Causes :program:`lli` to enable optimizations that may decrease floating point
147110 precision.
148111
149
150
151 **-soft-float**
152
153 Causes **lli** to generate software floating point library calls instead of
112 .. option:: -soft-float
113
114 Causes :program:`lli` to generate software floating point library calls instead of
154115 equivalent hardware instructions.
155
156
157
158116
159117 CODE GENERATION OPTIONS
160118 -----------------------
161119
162
163
164 **-code-model**\ =\ *model*
120 .. option:: -code-model=model
165121
166122 Choose the code model from:
167
168123
169124 .. code-block:: perl
170125
174129 medium: Medium code model
175130 large: Large code model
176131
177
178
179
180 **-disable-post-RA-scheduler**
132 .. option:: -disable-post-RA-scheduler
181133
182134 Disable scheduling after register allocation.
183135
184
185
186 **-disable-spill-fusing**
136 .. option:: -disable-spill-fusing
187137
188138 Disable fusing of spill code into instructions.
189139
190
191
192 **-jit-enable-eh**
140 .. option:: -jit-enable-eh
193141
194142 Exception handling should be enabled in the just-in-time compiler.
195143
196
197
198 **-join-liveintervals**
144 .. option:: -join-liveintervals
199145
200146 Coalesce copies (default=true).
201147
202
203
204 **-nozero-initialized-in-bss** Don't place zero-initialized symbols into the BSS section.
205
206
207
208 **-pre-RA-sched**\ =\ *scheduler*
148 .. option:: -nozero-initialized-in-bss
149
150 Don't place zero-initialized symbols into the BSS section.
151
152 .. option:: -pre-RA-sched=scheduler
209153
210154 Instruction schedulers available (before register allocation):
211
212155
213156 .. code-block:: perl
214157
220163 =list-tdrr: Top-down register reduction list scheduling
221164 =list-td: Top-down list scheduler -print-machineinstrs - Print generated machine code
222165
223
224
225
226 **-regalloc**\ =\ *allocator*
166 .. option:: -regalloc=allocator
227167
228168 Register allocator to use (default=linearscan)
229
230169
231170 .. code-block:: perl
232171
234173 =linearscan: linear scan register allocator =local - local register allocator
235174 =simple: simple register allocator
236175
237
238
239
240 **-relocation-model**\ =\ *model*
176 .. option:: -relocation-model=model
241177
242178 Choose relocation model from:
243
244179
245180 .. code-block:: perl
246181
248183 =static: Non-relocatable code =pic - Fully relocatable, position independent code
249184 =dynamic-no-pic: Relocatable external references, non-relocatable code
250185
251
252
253
254 **-spiller**
186 .. option:: -spiller
255187
256188 Spiller to use (default=local)
257
258189
259190 .. code-block:: perl
260191
261192 =simple: simple spiller
262193 =local: local spiller
263194
264
265
266
267 **-x86-asm-syntax**\ =\ *syntax*
195 .. option:: -x86-asm-syntax=syntax
268196
269197 Choose style of code to emit from X86 backend:
270
271198
272199 .. code-block:: perl
273200
274201 =att: Emit AT&T-style assembly
275202 =intel: Emit Intel-style assembly
276203
277
278
279
280
281204 EXIT STATUS
282205 -----------
283206
284
285 If **lli** fails to load the program, it will exit with an exit code of 1.
207 If :program:`lli` fails to load the program, it will exit with an exit code of 1.
286208 Otherwise, it will return the exit code of the program it executes.
287
288209
289210 SEE ALSO
290211 --------
291212
292
293 llc|llc
213 :program:`llc`