explain that NumElements in alloca and malloc defaults to one
[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.org/docs/Stacker.html> . The B<stkrc> compiler is fairly 
17 minimal. It compiles to bitcode only and doesn't perform any optimizations.
18 The output of stkrc (a bitcode 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 bitcode file. This option overrides that behavior. 
69
70 =item B<-s> F<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, especially those that 
74 recurse a lot, you might want to provide a larger value. Each unit of this
75 value consumes 8 bytes of memory.
76
77 =item B<-help>
78
79 Print a summary of command line options.
80
81 =back
82
83 =head1 EXIT STATUS
84
85 If B<stkrc> succeeds, it will exit with 0.  Otherwise, if an error
86 occurs, it will exit with a non-zero value, usually 1.
87
88 =head1 SEE ALSO
89
90 L<llvm-as>, L<http://llvm.org/docs/Stacker.html>
91
92 =head1 AUTHORS
93
94 Maintained by the LLVM Team (L<http://llvm.org>).
95
96 =cut