blob: c43bdcbb571cfc73ea99531a285c1ec44b0d17e3 [file] [log] [blame]
Reid Spencer8ec085c2004-07-10 20:04:02 +00001=pod
2
3=head1 NAME
4
5stkrc - Stacker Compiler
6
7=head1 SYNOPSIS
8
9B<stkrc> [I<options>] [I<filename>]
10
11=head1 DESCRIPTION
12
13The B<stkrc> command is the compiler for the Stacker language. Stacker is a
14simple stack based, Forth-like language that was written as a demonstration
15language for LLVM. For details on the language, please see
16L<http://llvm.cs.uiuc.edu/docs/Stacker.html> . The B<stkrc> compiler is fairly
17minimal. It compiles to bytecode only and doesn't perform any optimizations.
18The output of stkrc (a bytecode file) can be piped through other LLVM tools
19for optimization and linking.
20
21If F<filename> is omitted or is C<->, then B<stkrc> reads its input
22from standard input. This is useful for combining the tool into a pipeline.
23
24If an output file is not specified with the B<-o> option, then
25B<llvm-as> sends its output to a file or standard output by following
26these rules:
27
28=over
29
30=item *
31
32If the input is standard input, then the output is standard output.
33
34=item *
35
36If the input is a file that ends with C<.st>, then the output file is of
37the same name, except that the suffix is changed to C<.bc>.
38
39=item *
40
41If the input is a file that does not end with the C<.st> suffix, then the
42output file has the same name as the input file, except that the C<.bc>
43suffix is appended.
44
45=back
46
47=head1 OPTIONS
48
49=over
50
51=item B<-o> F<filename>
52
53Specify the output file name. If F<filename> is C<->, then B<llvm-as>
54sends its output to standard output.
55
56=item B<-stats>
57
58Print statistics acquired during compilation.
59
60=item B<-time-passes>
61
62Record the amount of time needed for each pass and print it to standard
63error.
64
65=item B<-f>
66
67Force the output to be written. Normally, B<stkrc> won't overwrite an existing
68bytecode file. This option overrides that behavior.
69
70=item B<-s=stacksize>
71
72Specify the stack size for the program. The default stack size, 1024, should be
73sufficient for most programs. For very large, programs, you might want to
74provide a larger value.
75
76=item B<-help>
77
78Print a summary of command line options.
79
80=back
81
82=head1 EXIT STATUS
83
84If B<stkrc> succeeds, it will exit with 0. Otherwise, if an error
85occurs, it will exit with a non-zero value, usually 1.
86
87=head1 SEE ALSO
88
89L<llvm-as>, L<http://llvm.cs.uiuc.edu/docs/Stacker.html>
90
91=head1 AUTHORS
92
93Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
94
95=cut