Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
| 5 | llc - LLVM static compiler |
| 6 | |
| 7 | =head1 SYNOPSIS |
| 8 | |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame] | 9 | B<llc> [I<options>] [I<filename>] |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 10 | |
| 11 | =head1 DESCRIPTION |
| 12 | |
| 13 | The B<llc> command compiles LLVM bytecode into assembly language for a |
| 14 | specified architecture. The assembly language output can then be passed through |
| 15 | a native assembler and linker to generate native code. |
| 16 | |
Chris Lattner | 0c123df | 2004-12-09 21:16:40 +0000 | [diff] [blame] | 17 | The choice of architecture for the output assembly code is automatically |
| 18 | determined from the input bytecode file, unless a B<-m> option is used to override |
| 19 | the default. |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 20 | |
| 21 | =head1 OPTIONS |
| 22 | |
| 23 | If I<filename> is - or omitted, B<llc> reads LLVM bytecode from standard input. |
| 24 | Otherwise, it will read LLVM bytecode from I<filename>. |
| 25 | |
| 26 | If the B<-o> option is omitted, then B<llc> will send its output to standard |
| 27 | output if the input is from standard input. If the B<-o> option specifies -, |
| 28 | then the output will also be sent to standard output. |
| 29 | |
| 30 | If no B<-o> option is specified and an input file other than - is specified, |
| 31 | then B<llc> creates the output filename by taking the input filename, |
| 32 | removing any existing F<.bc> extension, and adding a F<.s> suffix. |
| 33 | |
| 34 | Other B<llc> options are as follows: |
| 35 | |
| 36 | =over |
| 37 | |
| 38 | =item B<-f> |
| 39 | |
| 40 | Overwrite output files. By default, B<llc> will refuse to overwrite |
| 41 | an output file which already exists. |
| 42 | |
| 43 | =item B<-march>=I<arch> |
| 44 | |
| 45 | Specify the architecture for which to generate assembly. Valid |
| 46 | architectures are: |
| 47 | |
| 48 | =over |
| 49 | |
| 50 | =item I<x86> |
| 51 | |
| 52 | Intel IA-32 (Pentium and above) |
| 53 | |
Misha Brukman | 0d65a1f | 2004-11-15 20:22:49 +0000 | [diff] [blame] | 54 | =item I<ppc32> |
| 55 | |
| 56 | 32-bit PowerPC (MacOS X, 32-bit ABI) |
| 57 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 58 | =item I<sparcv9> |
| 59 | |
| 60 | 64-bit SPARC V9 |
| 61 | |
| 62 | =item I<c> |
| 63 | |
| 64 | Emit C code, not assembly |
| 65 | |
| 66 | =back |
| 67 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 68 | =item B<--disable-fp-elim> |
| 69 | |
| 70 | Disable frame pointer elimination optimization. |
| 71 | |
Chris Lattner | 0c123df | 2004-12-09 21:16:40 +0000 | [diff] [blame] | 72 | =item B<--enable-correct-eh-support> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 73 | |
Chris Lattner | 0c123df | 2004-12-09 21:16:40 +0000 | [diff] [blame] | 74 | Instruct the B<lowerinvoke> pass to insert code for correct exception handling |
| 75 | support. This is expensive and is by default omitted for efficiency. |
| 76 | |
| 77 | =item B<--help> |
| 78 | |
| 79 | Print a summary of command line options. |
| 80 | |
| 81 | =item B<--stats> |
| 82 | |
| 83 | Print statistics recorded by code-generation passes. |
| 84 | |
| 85 | =item B<--time-passes> |
| 86 | |
| 87 | Record the amount of time needed for each pass and print a report to standard |
| 88 | error. |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 89 | |
| 90 | =item B<--print-machineinstrs> |
| 91 | |
Chris Lattner | 0c123df | 2004-12-09 21:16:40 +0000 | [diff] [blame] | 92 | Print generated machine code between compilation phases (useful for debugging). |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 93 | |
| 94 | =item B<--regalloc>=I<allocator> |
| 95 | |
| 96 | Specify the register allocator to use. The default I<allocator> is I<local>. |
| 97 | Valid register allocators are: |
| 98 | |
| 99 | =over |
| 100 | |
| 101 | =item I<simple> |
| 102 | |
| 103 | Very simple "always spill" register allocator |
| 104 | |
| 105 | =item I<local> |
| 106 | |
| 107 | Local register allocator |
| 108 | |
| 109 | =item I<linearscan> |
| 110 | |
Alkis Evlogimenos | c8dec2c | 2004-07-21 08:18:50 +0000 | [diff] [blame] | 111 | Linear scan global register allocator |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 112 | |
Misha Brukman | 1e635c3 | 2004-07-21 12:53:14 +0000 | [diff] [blame] | 113 | =item I<iterativescan> |
Alkis Evlogimenos | 910d0d6 | 2004-07-21 08:24:35 +0000 | [diff] [blame] | 114 | |
| 115 | Iterative scan global register allocator |
| 116 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 117 | =back |
| 118 | |
| 119 | =item B<--spiller>=I<spiller> |
| 120 | |
| 121 | Specify the spiller to use for register allocators that support it. Currently |
| 122 | this option is used only by the linear scan register allocator. The default |
| 123 | I<spiller> is I<local>. Valid spillers are: |
| 124 | |
| 125 | =over |
| 126 | |
| 127 | =item I<simple> |
| 128 | |
| 129 | Simple spiller |
| 130 | |
| 131 | =item I<local> |
| 132 | |
| 133 | Local spiller |
| 134 | |
| 135 | =back |
| 136 | |
Reid Spencer | 9846a34 | 2005-01-25 05:04:49 +0000 | [diff] [blame] | 137 | =item B<--load>=F<dso_path> |
| 138 | |
| 139 | Dynamically load F<dso_path> (a path to a dynamically shared object) that |
| 140 | implements an LLVM target. This will permit the target name to be used with the |
| 141 | B<-march> option so that code can be generated for that target. |
| 142 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 143 | =back |
| 144 | |
Chris Lattner | 0c123df | 2004-12-09 21:16:40 +0000 | [diff] [blame] | 145 | =head2 Intel IA-32-specific Options |
| 146 | |
| 147 | =over |
| 148 | |
| 149 | =item B<--x86-asm-syntax=att|intel> |
| 150 | |
| 151 | Specify whether to emit assembly code in AT&T syntax (the default) or intel |
| 152 | syntax. |
| 153 | |
| 154 | =back |
| 155 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 156 | =head2 SPARCV9-specific Options |
| 157 | |
| 158 | =over |
| 159 | |
| 160 | =item B<--disable-peephole> |
| 161 | |
| 162 | Disable peephole optimization pass. |
| 163 | |
| 164 | =item B<--disable-sched> |
| 165 | |
| 166 | Disable local scheduling pass. |
| 167 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 168 | =back |
| 169 | |
| 170 | =head1 EXIT STATUS |
| 171 | |
| 172 | If B<llc> succeeds, it will exit with 0. Otherwise, if an error occurs, |
| 173 | it will exit with a non-zero value. |
| 174 | |
| 175 | =head1 SEE ALSO |
| 176 | |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame] | 177 | L<lli|lli> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 178 | |
| 179 | =head1 AUTHORS |
| 180 | |
| 181 | Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>). |
| 182 | |
| 183 | =cut |