Remove a few more warnings.
[suif.git] / html / man_scc.1.html
blobad124b52b8763faa381473cf0e888e94e86c86d1
1 <!-- manual page source format generated by PolyglotMan v3.0.7, -->
2 <!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
4 <HTML>
5 <HEAD>
6 <TITLE>Man page for scc.1</TITLE>
7 </HEAD>
8 <BODY bgcolor=white>
9 <A HREF="#toc">Table of Contents</A><P>
11 <H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
13 <P>
14 scc - SUIF compiler driver program
16 <H2><A NAME="sect1" HREF="#toc1"><B>Synopsis</B></A></H2>
18 <P>
19 <B>scc</B> [ <I>options</I> ] files ...
21 <H2><A NAME="sect2" HREF="#toc2"><B>Description</B></A></H2>
23 <P>
24 The <I>scc</I> program is the driver for the SUIF ANSI C and FORTRAN
25 77 compiler. It behaves much like the system's <I>cc</I>
26 compiler. SUIF is a multi-pass compiler. The following
27 chart shows the order in which some of the basic passes
28 are executed and the filename extensions that <I>scc</I> uses for
29 the output of each pass:
31 <DL>
33 <DT><I>.c</I> </DT></DT>
34 <DD> Fortran-to-C translator
35 </DD>
37 <DT><I>.i</I> </DT></DT>
38 <DD> C preprocessor
39 </DD>
41 <DT><I>.snt</I> </DT></DT>
42 <DD> C front end
43 </DD>
45 <DT><I>.spd</I> </DT></DT>
46 <DD> SUIF cleanup pass
47 </DD>
49 <DT><I>.spx</I> </DT></DT>
50 <DD> Expander
51 </DD>
53 <DT><I>.sfo</I> </DT></DT>
54 <DD> Back-end optimizer
55 </DD>
57 <DT><I>.s</I> </DT></DT>
58 <DD> Code generator (currently only for MIPS
59 systems)
60 </DD>
62 <DT><I>.o</I> </DT></DT>
63 <DD> Assembler
64 </DD>
66 <DT>(a.out) </DT></DT>
67 <DD> Linker
68 </DD>
69 </DL>
70 <P>
71 The extension of each filename argument determines where
72 in the compilation process the compiler will start for
73 that file. For example, files whose names end with <I>.c</I> are
74 assumed to be C source programs, whereas arguments whose
75 names end with <I>.s</I> are assumed to be assembler files.
76 Files with extensions <I>.f</I> and <I>.F</I> are both treated as Fortran
77 files.
79 <H2><A NAME="sect3" HREF="#toc3"><B>Options</B></A></H2>
81 <P>
82 Options with identical meanings to those in <I>cc</I> are <B>-S</B>, <B>-c</B>,
83 <B>-I</B>, <B>-D</B>, <B>-U</B>, <B>-o</B>, <B>-L</B>, <B>-G</B>, <B>-l</B>, <B>-w</B>, <B>-E</B> and <B>-M</B>. The following
84 options are specific to <I>scc</I>:
86 <DL>
88 <DT><B>-B</B><I>dir</I> </DT></DT>
89 <DD>Look for the compiler binaries in directory <I>dir</I>.
90 </DD>
92 <DT><B>-show</B></DT></DT>
93 <DD>
94 <B>-v</B>
95 </DD>
97 <DT><B>-V</B> </DT></DT>
98 <DD> As each pass is executed, print the pass name followed
99 by the command line to execute it.
100 </DD>
102 <DT><B>-k</B> </DT></DT>
103 <DD> Don't execute the passes. Useful in conjunction
104 </DD>
105 </DL>
107 with <B>-v</B> to see what passes <I>scc</I> executes with which
108 flags. For example, to see what passes are run
109 with the <B>-O</B> flag, run ``scc -v -k -O foo.c''.
111 <DL>
113 <DT><B>-T</B> </DT></DT>
114 <DD> Print timing information for each pass as it is
115 executed.
116 </DD>
118 <DT><B>-g</B> </DT></DT>
119 <DD> Keep symbolic information for debugging. This
120 affects only <I>s2c</I> or other back ends. For <I>s2c</I>, it
121 means putting the original source line numbers in
122 the output C file.
123 </DD>
125 <DT><B>-s2c</B> </DT></DT>
126 <DD>Use the SUIF-to-C pass in place of the SUIF backend.
127 This is the default for systems for which
128 there is no SUIF code generator (at present, everything
129 except MIPS).
130 </DD>
132 <DT><B>-cc</B> <I>compiler</I></DT></DT>
133 <DD>
134 Use the specified C compiler to generate code after
135 running the SUIF-to-C pass. This option is only
136 meaningful in combination with the <B>-s2c</B> option.
137 </DD>
139 <DT><B>-f2c</B></DT></DT>
140 <DD>
141 <B>-sf2c</B> Informs relevant passes that source files came from
142 Fortran. This is the default for filenames with <I>.f</I>
143 or <I>.F</I> extensions.
144 </DD>
146 <DT><B>-.</B><I>suffix</I></DT></DT>
147 <DD>
148 Stop the compilation process after files with the
149 given <I>suffix</I> have been generated (see chart above).
150 For example, the option ``-.sfo'' stops the compilation
151 process after optimization, placing output
152 in files with a suffix ``.sfo''. (The <B>-.s</B> and <B>-.o</B>
153 options are equivalent to <B>-S</B> and <B>-c</B> respectively.)
154 </DD>
156 <DT><B>-keep</B> </DT></DT>
157 <DD>Save all files generated for each phase, with the
158 appropriate extensions, in the current directory.
159 If this flag is repeated, also save temporary files
160 used within phases when a phase executes more than
161 one pass, as does the optimization phase.
162 </DD>
164 <DT><B>-O</B> </DT></DT>
165 <DD> Invoke the SUIF optimizer and register allocator.
166 If your program does not speed up by at least 50%,
167 Steve Tjiang will donate a pizza to the charity of
168 his choice. Really.
169 </DD>
171 <DT><B>-O2</B> </DT></DT>
172 <DD> Invoke the SUIF optimizer. Run an extra pass of
173 code motion.
174 </DD>
176 <DT><B>-Oivard</B></DT></DT>
177 <DD>
178 Find induction variables and perform other optimizations
179 in the front-end.
180 </DD>
182 <DT><B>-Oifs</B> </DT></DT>
183 <DD>Moves IFs in and then out again.
184 </DD>
186 <DT><B>-Oregs</B> Do register allocation.</DT></DT>
187 <DD>
188 </DD>
190 <DT><B>-t</B><I>dir</I> </DT></DT>
191 <DD>Use directory <I>dir</I> for temporaries. If no <B>-t</B> option
192 is specified, temporary files are written to the
193 /tmp directory by default. See also the <B>TMPDIR</B>
194 environment variable.
195 </DD>
197 <DT><B>-reassoc</B></DT></DT>
198 <DD>
199 Reassociate complex array address calculations such
200 that it is easier to code motion parts out of the
201 inner loop. The default is to do so only when
202 scalar optimization is being performed.
203 </DD>
205 <DT><B>-noreassoc</B></DT></DT>
206 <DD>
207 Don't bother to reassociate array address calculations.
208 </DD>
210 <DT><B>-Target</B> <I>machine</I></DT></DT>
211 <DD>
212 Override the default target architecture to perform
213 a cross-compilation with target <I>machine.</I> This
214 option only affects passes that are provided with
215 SUIF; correct cross-system use of assemblers, linkers,
216 back-end C compilers, and files include by the
217 C pre-processor is left up to the user. To be
218 safe, this option should only be used when compiling
219 up to the point where the code is converted out
220 of SUIF into assembly or back-end C code. Likewise,
221 system include-file compatability is up to
222 the user, so Fortran should be fine but typical C
223 code won't go through cpp correctly without additional
224 measures because the included system header
225 files will not be those of the target machine.
226 </DD>
228 <DT><B>-option</B> <I>passname</I> <I>flags</I></DT></DT>
229 <DD>
230 Call compilation pass <I>passname</I> with the <I>flags</I>
231 options. For example, use ``-option SKWEEL -W'' to
232 have <I>skweel</I> print out statistics. You need to know
233 the name of the pass to use this flag. Some common
234 pass names are: <B>SF2C</B>, <B>CPP</B>, <B>SNOOT</B>, <B>FIXFORTRAN</B>, <B>MGEN</B>,
235 and <B>LD</B>. Phases that might run more than once have
236 more obscure names, since each pass must be
237 uniquely named. If you use the verbose option
238 (-v), you will see the pass name of each pass as it
239 is executed, followed by the command to run that
240 pass. See the table in src/scc/commands.def for a
241 complete list.
242 </DD>
244 <DT><B>-yes</B> <I>passname</I></DT></DT>
245 <DD>
246 Force a particular pass to run, overriding other
247 options. For example, ``scc f.c -yes SR'' runs the
248 strength reduction pass, even though <B>-O</B> wasn't
249 specified. The string <I>passname</I> must be a valid
250 pass name; see the <B>-option</B> flag for details about
251 pass names.
252 </DD>
254 <DT><B>-no</B> <I>passname</I></DT></DT>
255 <DD>
256 This is the opposite of the <B>-yes</B> flag. It prevents
257 a pass from running, even if specified by other
258 options. For example, ``scc -O f.c -no REG' runs
259 the optimizer but skips the register allocation
260 phase. As with the <B>-yes</B> flag, <I>passname</I> must be a
261 valid pass name; see the <B>-option</B> flag for details
262 about pass names.
263 </DD>
265 <DT><B>-automatic</B></DT></DT>
266 <DD>
267 Put Fortran locals on the stack by calling <I>sf2c</I>
268 with the <B>-a</B> flag. This is the default.
269 </DD>
271 <DT><B>-static</B></DT></DT>
272 <DD>
273 Keep Fortran locals in memory and initialize them
274 to zero.
275 </DD>
277 <DT><B>-N</B><I>anything</I></DT></DT>
278 <DD>
279 Any flag beginning with upper case ``N'' is passed
280 through to <I>sf2c</I> unchanged. <I>sf2c</I> uses this to specify
281 implementation limits for its own internal processing.
282 See the <I>sf2c</I> documentation.
283 </DD>
285 <DT><B>-checkwarn</B></DT></DT>
286 <DD>
287 This runs <I>checksuif1</I> on the output of every pass
288 that produces a SUIF1 file. The <I>checksuif1</I> program
289 is given the <B>-warn</B> flag so it will print a warning
290 about anything illegal that it finds.
291 </DD>
293 <DT><B>-checkfail</B></DT></DT>
294 <DD>
295 This is identical to <B>-checkwarn</B> except that it
296 gives the <B>-fail</B> switch to <I>checksuif1</I> so it will
297 print an error message and abort the whole compile
298 if it finds a problem.
299 </DD>
301 <DT><B>-Wall</B> </DT></DT>
302 <DD>This turns on all warnings again, in case they were
303 turned off by <B>-w</B>.
304 </DD>
305 </DL>
307 <H2><A NAME="sect4" HREF="#toc4"><B>Environment</B> <B>Variables</B></A></H2>
310 <B>SUIFHOME</B><BR>
312 The top directory in the SUIF file hierarchy.
314 <DL>
316 <DT><B>MACHINE</B></DT></DT>
317 <DD>
318 The type of machine on which the system is running.
319 The convention used is &lt;architecture&gt;-&lt;vendor&gt;-&lt;OS&gt;,
320 for example, mips-sgi-irix5, sparc-sunsunos4,
321 or mips-dec-ultrix.
322 </DD>
324 <DT><B>SUIFPATH</B></DT></DT>
325 <DD>
326 List of directories to search for SUIF binaries.
327 The directory names are separated by colons. If
328 this variable is not specified, <I>scc</I> defaults to
329 look in the $<B>SUIFHOME</B>/$<B>MACHINE</B>/bin directory.
330 </DD>
331 </DL>
333 <B>TMPDIR</B> Directory where temporary files are stored. The
334 default value is /tmp. This can also be overridden
335 with the <B>-t</B> option.
337 <H2><A NAME="sect5" HREF="#toc5"><B>History</B></A></H2>
340 The <I>scc</I> program was originally written by Michael Wolf,
341 who also developed the basis for the table-driven approach
342 that is currently used by <I>scc</I>. Bob Wilson rewrote most of
343 the original code to make the pass table more flexible and
344 to support interprocedural passes. Since then Chris Wilson
345 has fixed several bugs and made a lot of updates to
346 the options and passes.
349 <HR><P>
350 <A NAME="toc"><B>Table of Contents</B></A><P>
351 <UL>
352 <LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
353 <LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
354 <LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
355 <LI><A NAME="toc3" HREF="#sect3">Options</A></LI>
356 <LI><A NAME="toc4" HREF="#sect4">Environment Variables</A></LI>
357 <LI><A NAME="toc5" HREF="#sect5">History</A></LI>
358 </UL>
359 </BODY></HTML>