The IR described in these notes is defined in the Java package harpoon.IR.QuadSSA. Source code and binaries are available at http:// www.magic.lcs.mit.edu/ Harpoon.
The QuadSSA statements are called Quads and are subclasses of harpoon.IR.QuadSSA.Quad; they are graph-structured and doubly-linked to enable both forward and reverse traversal of the control-flow graph. Edges are represented by Objects to facilitate associating analysis data with these control-flow graph edges. The parent class Quad contains the graph-oriented methods of the objects. Its superinterface harpoon.ClassFile.HCodeElement defines standard methods to get object ID numbers and source file information which are valid for elements of any intermediate representation.
An enumeration of Quad types and their uses is provided in figure 3. It may be observed that the representation uses both header and footer nodes, in the HEADER and FOOTER classes. HEADER nodes contain a special link to the FOOTER to allow this node to be easily identified, and a special subclass of HEADER, METHODHEADER, provides information on the assignment of method arguments to compiler temporary variables at the start of method code.
With the exception of CJMP, SWITCH, PHI, HEADER, METHODHEADER, and FOOTER, all Quads have exactly one predecessor and one successor in the control flow graph.