Go to the first, previous, next, last section, table of contents.

Representation of Source Files

Each SUIF program has a single internal data structure, called a file set, which contains the global symbol table and a list of the files being compiled. Many passes work on a single file at a time, in which case the file set contains only one file and is not very useful. Interprocedural passes, on the other hand, typically need to work on all of the files at once. By using the file set, these interprocedural passes need not resort to combining all of the code into one big source file.

A source file within a file set is represented by a file set entry, which contains the symbol table for the file scope and the input and output streams. File sets provide the mechanism to allow multiple files to be read and written by a SUIF pass.

The symbol tables in the file set and file set entries basically form a table of contents for the entire program. They contain entries for every symbol and type that is declared outside of procedures. The procedures and everything within them can be accessed via the procedure symbols in the global symbol tables.

The `fileset.h' and `fileset.cc' files contain the source code for the file set and file set entries.


Go to the first, previous, next, last section, table of contents.