This document provides the basic information to help you get started programming in SUIF. We assume that you have already read the document An Overview of the SUIF2 Compiler Infrastructure, which can be found through http://suif.stanford.edu. As explained in that document, the system is based on two fundamental concepts: an extensible program immediate representation (IR) and a flexible module system. The system comes with a set of predefined IR nodes, the details of which can be found in the document The SUIF Program Representation14 ../suifguide/suifguide.html. This guide discusses how to write code using the basic SUIF infrastructure. More specifically, it describes how to program in the module subsystem and how to define new IR nodes. Details of the implementation of the SUIF infrastructure are outside the scope of this document.
Many of you will use the IR that comes with the basic infrastructure and need not define any new SUIF objects. If you work with new programming constructs, you might want to create new nodes as subclasses of some predefined SUIF IR nodes. Even if you are not working with new programming semantics, you might also find it useful to define data structures in your analysis as new SUIF objects. SUIF objects have a standard interface and inherit many useful functions, such as the ability to be written out and read from files.
Here is the organization of the rest of this document:
|Chapter 2.||An introduction to the base SUIF IR|
|Chapter 3.||Programming with the SUIF program representation|
|Chapter 4.||Writing a pass|
|Chapter 5.||The basic data structures|
|Chapter 6.||Generating SUIF intermediate representation nodes|
|Chapter 7.||Hoof files in detail|
|Chapter 8.||The Makefile system and system installation|
Besides the basic infrastructure, the SUIF system comes with a suite of SUIF standalone programs, passes, and useful data structures and utilities. We are continuing to create more software based on the system which will be released when they are ready. Please consult the SUIF home page http://suif.stanford.edu for an up-to-date list of the available software.