Brian Gaeke | f36e2d5 | 2004-06-02 19:12:38 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
Reid Spencer | 776b16d | 2007-02-03 00:44:47 +0000 | [diff] [blame] | 5 | gccas - convenience script to run B<llvm-as> and B<opt> |
Brian Gaeke | f36e2d5 | 2004-06-02 19:12:38 +0000 | [diff] [blame] | 6 | |
| 7 | =head1 SYNOPSIS |
| 8 | |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame] | 9 | B<gccas> [I<options>] I<filename> |
Brian Gaeke | f36e2d5 | 2004-06-02 19:12:38 +0000 | [diff] [blame] | 10 | |
| 11 | =head1 DESCRIPTION |
| 12 | |
Reid Spencer | 776b16d | 2007-02-03 00:44:47 +0000 | [diff] [blame] | 13 | The B<gccas> shell script passes an LLVM assembly file through the B<llvm-as> |
| 14 | and B<opt> programs to generate an optimized bytecode file. Its name is an |
| 15 | historical artifact from when it was a full executable used to process LLVM |
| 16 | assembly generated by the L<llvmgcc|llvmgcc> or L<llvmg++|llvmgxx> front-ends. |
| 17 | Currently this is a shell script that simulates what the old B<gccas> executable |
| 18 | once did. |
Brian Gaeke | f36e2d5 | 2004-06-02 19:12:38 +0000 | [diff] [blame] | 19 | |
Reid Spencer | 776b16d | 2007-02-03 00:44:47 +0000 | [diff] [blame] | 20 | B<gccas> performs a number of optimizations on the input program, including but |
| 21 | not limited to: promotion of stack values to SSA registers; elimination of dead |
| 22 | globals, function arguments, code, and types; tail-call elimination; |
| 23 | loop-invariant code motion; global common-subexpression elimination; and |
| 24 | sparse conditional constant propagation. It accomplishes this by using the |
| 25 | B<-std-compile-opts> option to the B<opt> tool. |
Brian Gaeke | f36e2d5 | 2004-06-02 19:12:38 +0000 | [diff] [blame] | 26 | |
| 27 | =head1 OPTIONS |
| 28 | |
| 29 | =over |
| 30 | |
| 31 | =item B<--help> |
| 32 | |
| 33 | Print a summary of command line options. |
| 34 | |
| 35 | =item B<-o> F<filename> |
| 36 | |
| 37 | Specify the name of the output file which will hold the assembled bytecode. |
| 38 | |
| 39 | =item B<--disable-inlining> |
| 40 | |
| 41 | Disable the inlining pass. By default, it is enabled. |
| 42 | |
| 43 | =item B<--disable-opt> |
| 44 | |
| 45 | Disable all assembler-time optimization passes. |
| 46 | |
John Criswell | b52818e | 2006-11-21 22:53:12 +0000 | [diff] [blame] | 47 | =item B<-disable-compression> |
| 48 | |
| 49 | Do not compress the generated bytecode. |
| 50 | |
Brian Gaeke | f36e2d5 | 2004-06-02 19:12:38 +0000 | [diff] [blame] | 51 | =item B<--stats> |
| 52 | |
| 53 | Print statistics. |
| 54 | |
| 55 | =item B<--time-passes> |
| 56 | |
| 57 | Record the amount of time needed for each pass and print it to standard |
| 58 | error. |
| 59 | |
| 60 | =item B<--verify> |
| 61 | |
| 62 | Verify each pass result. |
| 63 | |
| 64 | =back |
| 65 | |
| 66 | =head1 EXIT STATUS |
| 67 | |
| 68 | If B<gccas> succeeds, it will exit with an exit status of 0. |
| 69 | Otherwise, if an error occurs, it will exit with a non-zero exit |
| 70 | status. |
| 71 | |
| 72 | =head1 SEE ALSO |
| 73 | |
Reid Spencer | 776b16d | 2007-02-03 00:44:47 +0000 | [diff] [blame] | 74 | L<llvm-as|llvm-as>, L<opt|opt>, L<gccld|gccld> |
Brian Gaeke | f36e2d5 | 2004-06-02 19:12:38 +0000 | [diff] [blame] | 75 | |
| 76 | =head1 AUTHORS |
| 77 | |
Reid Spencer | cd143fc | 2006-03-14 05:42:07 +0000 | [diff] [blame] | 78 | Maintained by the LLVM Team (L<http://llvm.org>). |
Brian Gaeke | f36e2d5 | 2004-06-02 19:12:38 +0000 | [diff] [blame] | 79 | |
| 80 | =cut |