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       --frame-pointer
80              Specify  effect  of  frame  pointer   elimination   optimization
81              (all,non-leaf,none).
82
83       --disable-excess-fp-precision
84              Disable  optimizations  that  may  produce  excess precision for
85              floating point.  Note that this  option  can  dramatically  slow
86              down code on some systems (e.g. X86).
87
88       --enable-no-infs-fp-math
89              Enable optimizations that assume no Inf values.
90
91       --enable-no-nans-fp-math
92              Enable optimizations that assume no NAN values.
93
94       --enable-unsafe-fp-math
95              Enable  optimizations  that  make  unsafe assumptions about IEEE
96              math (e.g. that addition is associative) or may not work for all
97              input  ranges.   These optimizations allow the code generator to
98              make use of some  instructions  which  would  otherwise  not  be
99              usable (such as fsin on X86).
100
101       --stats
102              Print statistics recorded by code-generation passes.
103
104       --time-passes
105              Record  the  amount  of  time  needed  for each pass and print a
106              report to standard error.
107
108       --load=<dso_path>
109              Dynamically load  dso_path  (a  path  to  a  dynamically  shared
110              object)  that  implements  an LLVM target.  This will permit the
111              target name to be used with the -march option so that  code  can
112              be generated for that target.
113
114       -meabi=[default|gnu|4|5]
115              Specify  which  EABI version should conform to.  Valid EABI ver‐
116              sions are gnu, 4 and 5.  Default value (default) depends on  the
117              triple.
118
119       -stack-size-section
120              Emit  the  .stack_sizes  section which contains stack size meta‐
121              data. The section contains an array of pairs of function  symbol
122              values  (pointer  size)  and  stack sizes (unsigned LEB128). The
123              stack size values only include the space allocated in the  func‐
124              tion  prologue. Functions with dynamic stack allocations are not
125              included.
126
127   Tuning/Configuration Options
128       --print-machineinstrs
129              Print generated machine code between compilation phases  (useful
130              for debugging).
131
132       --regalloc=<allocator>
133              Specify  the  register allocator to use.  Valid register alloca‐
134              tors are:
135
136              basic
137                 Basic register allocator.
138
139              fast
140                 Fast register allocator. It is the  default  for  unoptimized
141                 code.
142
143              greedy
144                 Greedy  register  allocator.  It is the default for optimized
145                 code.
146
147              pbqp
148                 Register allocator based on  'Partitioned  Boolean  Quadratic
149                 Programming'.
150
151       --spiller=<spiller>
152              Specify  the spiller to use for register allocators that support
153              it.  Currently this option is used only by the linear scan  reg‐
154              ister  allocator.  The default spiller is local.  Valid spillers
155              are:
156
157              simple
158                 Simple spiller
159
160              local
161                 Local spiller
162
163   Intel IA-32-specific Options
164       --x86-asm-syntax=[att|intel]
165              Specify whether to  emit  assembly  code  in  AT&T  syntax  (the
166              default) or Intel syntax.
167

EXIT STATUS

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

SEE ALSO

173       lli
174

AUTHOR

176       Maintained by the LLVM Team (https://llvm.org/).
177
179       2003-2019, LLVM Project
180
181
182
183
1848                                 2019-04-25                            LLC(1)
Impressum