Go to the previous, next section.
Before running a Simple-SUIF program, the source file must first be run through the front-end of the SUIF compiler to produce a binary SUIF file (1). This file can then be read by a Simple-SUIF program. Such a program is produced by linking with the Simple-SUIF library, which takes care of all of the details of working with SUIF files. Only the main program and a function to process each procedure must be provided. The main program is a simple C++ program to read the command-line arguments, initialize the SUIF library, and call the Simple-SUIF driver. Because this program rarely needs to be changed, most applications can just copy the main program from another Simple-SUIF program (e.g. printsimple).
The library's driver function reads each procedure and converts it to a
list of Simple-SUIF instructions. It then passes the list of
instructions to the do_procedure
function provided by the
user. The code in the do_procedure
function can then analyze
the instructions and implement various optimizations. When it is
finished, it returns the list of instructions, which the driver then
converts back to SUIF and writes to the output file.
Go to the previous, next section.