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