blob: 54e46b444d3d239506a619f68a2eedc3e2245961 [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
Reid Spencere5eb5072004-07-10 23:41:08 +000070=item B<-s> F<stacksize>
Reid Spencer8ec085c2004-07-10 20:04:02 +000071
72Specify the stack size for the program. The default stack size, 1024, should be
Reid Spencere5eb5072004-07-10 23:41:08 +000073sufficient for most programs. For very large programs, especially those that
74recurse a lot, you might want to provide a larger value. Each unit of this
75value consumes 8 bytes of memory.
Reid Spencer8ec085c2004-07-10 20:04:02 +000076
77=item B<-help>
78
79Print a summary of command line options.
80
81=back
82
83=head1 EXIT STATUS
84
85If B<stkrc> succeeds, it will exit with 0. Otherwise, if an error
86occurs, it will exit with a non-zero value, usually 1.
87
88=head1 SEE ALSO
89
90L<llvm-as>, L<http://llvm.cs.uiuc.edu/docs/Stacker.html>
91
92=head1 AUTHORS
93
94Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
95
96=cut