Table of Contents
pscc - parallelizing SUIF compiler driver program
pscc [ options ] files ...
The pscc program is a version of the scc driver with parallelization features added. It is a driver for the SUIF ANSI C and FORTRAN 77 compiler. It behaves much like the system's cc compiler. SUIF is a multi-pass compiler. The following chart shows the order in which some of the basic passes are executed and the filename extensions that pscc uses for the output of each pass:
.c Fortran-to-C translator
.i C preprocessor
.snt C front end
.spd SUIF cleanup pass
.sfo Back-end optimizer
.s Code generator (currently only for MIPS systems)
The extension of each filename argument determines where in the compilation process the compiler will start for that file. For example, files whose names end with .c are assumed to be C source programs, whereas arguments whose names end with .s are assumed to be assembler files. Files with extensions .f and .F are both treated as Fortran files.
Options with identical meanings to those in cc are -S, -c, -I, -D, -U, -o, -L, -G, -l, -w, -E and -M. The following options are specific to pscc:
Look for the compiler binaries in directory dir.
-V As each pass is executed, print the pass name followed by the command line to execute it.
-k Don't execute the passes. Useful in conjunction with -v to see
what passes pscc executes with which flags. For example, to see what passes are run with the -O flag, run ``pscc -v -k -O foo.c''.
-T Print timing information for each pass as it is executed.
-g Keep symbolic information for debugging. This affects only s2c or other back ends. For s2c, it means putting the original source line numbers in the output C file.
-s2c Use the SUIF-to-C pass in place of the SUIF back-end. This is the default for systems for which there is no SUIF code generator (at present, everything except MIPS).
Use the specified C compiler to generate code after running the SUIF-to-C pass. This option is only meaningful in combination with the -s2c option.
Informs relevant passes that source files came from Fortran. This is the default for filenames with .f or .F extensions.
Stop the compilation process after files with the given suffix have been generated (see chart above). For example, the option ``-.sfo'' stops the compilation process after optimization, placing output in files with a suffix ``.sfo''. (The -.s and -.o options are equivalent to -S and -c respectively.)
Save all files generated for each phase, with the appropriate extensions, in the current directory. If this flag is repeated, also save temporary files used within phases when a phase executes more than one pass, as does the optimization phase.
-O Invoke the SUIF optimizer and register allocator. If your program does not speed up by at least 50%, Steve Tjiang will donate a pizza to the charity of his choice. Really.
-O2 Invoke the SUIF optimizer. Run an extra pass of code motion.
Find induction variables and perform other optimizations in the front-end.
Moves IFs in and then out again.
Do register allocation.
Use directory dir for temporaries. If no -t option is specified, temporary files are written to the /tmp directory by default. See also the TMPDIR environment variable.
Produce parallel code using the old SUIF optimizer. Unlike the
- -parallel flag, with this option the SUIF code is turned into old
- SUIF code and several passes are run to attempt to increase the information available for parallelization. The code is then turned back into new SUIF for parallelization. This option can be somewhat buggy as the old SUIF optimizer has some problems. -parallel Produce parallel code. Only new SUIF passes are used for parallelization. This avoids the bugs from old SUIF that the -multi flag gets in some cases. The optimizations used by -multi use stronger algorithms than those currently implemented in new SUIF, however, so that option may give more parallelism when it does work. -reassoc Reassociate complex array address calculations such that it is easier to code motion parts out of the inner loop. The default is to do so only when scalar optimization is being performed. -noreassoc Don't bother to reassociate array address calculations. -Target machine Override the default target architecture to perform a crosscompilation with target machine. This option only affects passes that are provided with SUIF; correct cross-system use of assemblers, linkers, back-end C compilers, and files include by the C pre-processor is left up to the user. To be safe, this option should only be used when compiling up to the point where the code is converted out of SUIF into assembly or back-end C code. Likewise, system include-file compatability is up to the user, so Fortran should be fine but typical C code won't go through cpp correctly without additional measures because the included system header files will not be those of the target machine. -option passname flags Call compilation pass passname with the flags options. For example, use ``-option SKWEEL -W'' to have skweel print out statistics. You need to know the name of the pass to use this flag. Some common pass names are: SF2C, CPP, SNOOT, FIXFORTRAN, MGEN, and LD. Phases that might run more than once have more obscure names, since each pass must be uniquely named. If you use the verbose option (-v), you will see the pass name of each pass as it is executed, followed by the command to run that pass. See the table in src/baseparsuif/pscc/commands.def for a complete list. -yes passname Force a particular pass to run, overriding other options. For example, ``pscc f.c -yes SR'' runs the strength reduction pass, even though -O wasn't specified. The string passname must be a valid pass name; see the -option flag for details about pass names. -no passname This is the opposite of the -yes flag. It prevents a pass from running, even if specified by other options. For example, ``pscc
- -O f.c -no REG' runs the optimizer but skips the register alloca
- tion phase. As with the -yes flag, passname must be a valid pass name; see the -option flag for details about pass names. -automatic Put Fortran locals on the stack by calling sf2c with the -a flag. This is the default. -static Keep Fortran locals in memory and initialize them to zero. -Nanything Any flag beginning with upper case ``N'' is passed through to sf2c unchanged. sf2c uses this to specify implementation limits for its own internal processing. See the sf2c documentation. -checkwarn This runs checksuif on the output of every pass that produces a SUIF file. The checksuif program is given the -warn flag so it will print a warning about anything illegal that it finds. -checkfail This is identical to -checkwarn except that it gives the -fail switch to checksuif so it will print an error message and abort the whole compile if it finds a problem. -Wall This turns on all warnings again, in case they were turned off by
The top directory in the SUIF file hierarchy. MACHINE
The type of machine on which the system is running. The convention used is <architecture>-<vendor>-<OS>, for example, mips-sgi-irix5, sparc-sun-sunos4, or mips-dec-ultrix.
List of directories to search for SUIF binaries. The directory names are separated by colons. If this variable is not specified, pscc defaults to look in the $SUIFHOME/$MACHINE/bin directory. TMPDIR
Directory where temporary files are stored. The default value is /tmp. This can also be overridden with the -t option.
The pscc program is a mutation of the scc program to contain parallization features that are being removed from the basic scc.
Table of Contents