1LLC(1)                               LLVM                               LLC(1)
2
3
4

NAME

6       llc - LLVM static compiler
7

SYNOPSIS

9       llc [options] [filename]
10

DESCRIPTION

12       The  llc command compiles LLVM source inputs into assembly language for
13       a specified architecture.  The assembly language  output  can  then  be
14       passed  through a native assembler and linker to generate a native exe‐
15       cutable.
16
17       The choice of architecture for the output assembly  code  is  automati‐
18       cally  determined from the input file, unless the -march option is used
19       to override the default.
20

OPTIONS

22       If filename is "-" or omitted, llc reads from standard  input.   Other‐
23       wise, it will from filename.  Inputs can be in either the LLVM assembly
24       language format (.ll) or the LLVM bitcode format (.bc).
25
26       If the -o option is omitted, then llc will send its output to  standard
27       output if the input is from standard input.  If the -o option specifies
28       "-", then the output will also be sent to standard output.
29
30       If no -o option is specified and an input file other than "-" is speci‐
31       fied,  then  llc  creates the output filename by taking the input file‐
32       name, removing any existing .bc extension, and adding a .s suffix.
33
34       Other llc options are described below.
35
36   End-user Options
37       -help  Print a summary of command line options.
38
39       -O=uint
40              Generate code at different optimization  levels.   These  corre‐
41              spond  to the -O0, -O1, -O2, and -O3 optimization levels used by
42              clang.
43
44       -mtriple=<target triple>
45              Override the target triple specified in the input file with  the
46              specified string.
47
48       -march=<arch>
49              Specify  the  architecture for which to generate assembly, over‐
50              riding the target encoded in the input file.  See the output  of
51              llc -help for a list of valid architectures.  By default this is
52              inferred from the target triple or autodetected to  the  current
53              architecture.
54
55       -mcpu=<cpuname>
56              Specify  a specific chip in the current architecture to generate
57              code for.  By default this is inferred from  the  target  triple
58              and  autodetected  to  the  current architecture.  For a list of
59              available CPUs, use:
60
61                 llvm-as < /dev/null | llc -march=xyz -mcpu=help
62
63       -filetype=<output file type>
64              Specify what kind of output llc should generated.  Options  are:
65              asm  for  textual  assembly ( '.s'), obj for native object files
66              ('.o') and null for not emitting anything (for performance test‐
67              ing).
68
69              Note that not all targets support all options.
70
71       -mattr=a1,+a2,-a3,...
72              Override  or  control specific attributes of the target, such as
73              whether SIMD operations are enabled or not.  The default set  of
74              attributes  is  set by the current CPU.  For a list of available
75              attributes, use:
76
77                 llvm-as < /dev/null | llc -march=xyz -mattr=help
78
79       --disable-fp-elim
80              Disable frame pointer elimination optimization.
81
82       --disable-excess-fp-precision
83              Disable optimizations that  may  produce  excess  precision  for
84              floating  point.   Note  that  this option can dramatically slow
85              down code on some systems (e.g. X86).
86
87       --enable-no-infs-fp-math
88              Enable optimizations that assume no Inf values.
89
90       --enable-no-nans-fp-math
91              Enable optimizations that assume no NAN values.
92
93       --enable-unsafe-fp-math
94              Enable optimizations that make  unsafe  assumptions  about  IEEE
95              math (e.g. that addition is associative) or may not work for all
96              input ranges.  These optimizations allow the code  generator  to
97              make  use  of  some  instructions  which  would otherwise not be
98              usable (such as fsin on X86).
99
100       --stats
101              Print statistics recorded by code-generation passes.
102
103       --time-passes
104              Record the amount of time needed  for  each  pass  and  print  a
105              report to standard error.
106
107       --load=<dso_path>
108              Dynamically  load  dso_path  (a  path  to  a  dynamically shared
109              object) that implements an LLVM target.  This  will  permit  the
110              target  name  to be used with the -march option so that code can
111              be generated for that target.
112
113       -meabi=[default|gnu|4|5]
114              Specify which EABI version should conform to.  Valid  EABI  ver‐
115              sions  are gnu, 4 and 5.  Default value (default) depends on the
116              triple.
117
118       -stack-size-section
119              Emit the .stack_sizes section which contains  stack  size  meta‐
120              data.  The section contains an array of pairs of function symbol
121              values (pointer size) and stack  sizes  (unsigned  LEB128).  The
122              stack  size values only include the space allocated in the func‐
123              tion prologue. Functions with dynamic stack allocations are  not
124              included.
125
126   Tuning/Configuration Options
127       --print-machineinstrs
128              Print  generated machine code between compilation phases (useful
129              for debugging).
130
131       --regalloc=<allocator>
132              Specify the register allocator to use.  Valid  register  alloca‐
133              tors are:
134
135              basic
136                 Basic register allocator.
137
138              fast
139                 Fast  register  allocator.  It is the default for unoptimized
140                 code.
141
142              greedy
143                 Greedy register allocator. It is the  default  for  optimized
144                 code.
145
146              pbqp
147                 Register  allocator  based  on 'Partitioned Boolean Quadratic
148                 Programming'.
149
150       --spiller=<spiller>
151              Specify the spiller to use for register allocators that  support
152              it.   Currently this option is used only by the linear scan reg‐
153              ister allocator.  The default spiller is local.  Valid  spillers
154              are:
155
156              simple
157                 Simple spiller
158
159              local
160                 Local spiller
161
162   Intel IA-32-specific Options
163       --x86-asm-syntax=[att|intel]
164              Specify  whether  to  emit  assembly  code  in  AT&T syntax (the
165              default) or Intel syntax.
166

EXIT STATUS

168       If llc succeeds, it will exit with 0.  Otherwise, if an  error  occurs,
169       it will exit with a non-zero value.
170

SEE ALSO

172       lli
173

AUTHOR

175       Maintained by The LLVM Team (http://llvm.org/).
176
178       2003-2020, LLVM Project
179
180
181
182
1837                                 2020-08-01                            LLC(1)
Impressum