Go to the next section.

Version 1.0

This manual is part of the SUIF compiler documentation set.

Copyright (C) 1994 Stanford University. All rights reserved.

Permission is given to use, copy, and modify this documentation for any non-commercial purpose as long as this copyright notice is not removed. All other uses, including redistribution in whole or in part, are forbidden without prior written permission.


Each pass of the SUIF compiler represents an input program using a set of complex data structures. Thus when a compiler pass needs to modify the original program, it needs to manipulate these data structures. A simple five line C program may need a few hundred complex structures to represent the program in a SUIF compiler pass. Changing a single line of the original C program while executing the compiler pass means updating many of these data structures. These data structures are highly interdependent and have to conform to a complex set of rules.

The goal of the builder is to abstract these complexities away from a programmer writing a pass for the SUIF compiler. When a programmer needs to change or add new code to the input program, the builder will provide a simple and nice abstraction. Advantages of using the builder are:

Go to the next section.