harpoon.IR.Quads
Class LABEL

java.lang.Object
  extended by harpoon.IR.Quads.Quad
      extended by harpoon.IR.Quads.PHI
          extended by harpoon.IR.Quads.LABEL
All Implemented Interfaces:
HCodeElement, CFGraphable<Quad,Edge>, UseDefable, Graph.Node<Quad,Edge>, Serializable, Cloneable, Comparable<Quad>

public class LABEL
extends PHI

LABEL marks a basic-block entrance.

Version:
$Id: LABEL.java,v 1.3 2002/04/11 04:00:34 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Field Summary
protected  String label
          the (optional) name of this label.
 
Fields inherited from class harpoon.IR.Quads.PHI
dst, src
 
Fields inherited from class harpoon.IR.Quads.Quad
arrayFactory
 
Constructor Summary
LABEL(QuadFactory qf, HCodeElement source, String label, Temp[] dst, int arity)
           
LABEL(QuadFactory qf, HCodeElement source, String label, Temp[] dst, Temp[][] src, int arity)
          Creates a LABEL representing the entrance to a basic block.
LABEL(QuadFactory qf, PHI phi, String label)
          Creates a LABEL to replace a PHI.
 
Method Summary
<T> T
accept(QuadValueVisitor<T> v)
           
 void accept(QuadVisitor v)
          Accept a visitor.
 int kind()
          Return an integer enumeration of the kind of this Quad.
 String label()
          Returns the optional name of this label, or null if this label has no name.
 Quad rename(QuadFactory qqf, TempMap defMap, TempMap useMap)
          Create a new Quad identical to the receiver, but with all Temps renamed according to a mapping.
 String toString()
          Returns a human-readable representation of this quad.
 
Methods inherited from class harpoon.IR.Quads.PHI
arity, def, dst, grow, hasConflicts, numPhis, removePhi, removePred, shrink, src, src, use
 
Methods inherited from class harpoon.IR.Quads.Quad
addEdge, addEdges, addHandlers, clone, clone, clone, compareTo, defC, edgeC, edges, getFactory, getID, getLineNumber, getSourceFile, handlers, hashCode, isPred, isSucc, map, map, map, next, next, nextEdge, nextEdge, nextLength, pred, predC, prev, prev, prevEdge, prevEdge, prevLength, remove, removeHandlers, rename, replace, succ, succC, toLongString, transferHandlers, useC
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

label

protected String label
the (optional) name of this label.

null if the label has no name.

Constructor Detail

LABEL

public LABEL(QuadFactory qf,
             HCodeElement source,
             String label,
             Temp[] dst,
             Temp[][] src,
             int arity)
Creates a LABEL representing the entrance to a basic block.

Parameters:
label - the name of this label, or null for no name.

LABEL

public LABEL(QuadFactory qf,
             HCodeElement source,
             String label,
             Temp[] dst,
             int arity)

LABEL

public LABEL(QuadFactory qf,
             PHI phi,
             String label)
Creates a LABEL to replace a PHI.

Parameters:
label - the name of this label, or null for no name.
Method Detail

label

public String label()
Returns the optional name of this label, or null if this label has no name.


kind

public int kind()
Description copied from class: Quad
Return an integer enumeration of the kind of this Quad. The enumerated values are defined in QuadKind.

Overrides:
kind in class PHI

rename

public Quad rename(QuadFactory qqf,
                   TempMap defMap,
                   TempMap useMap)
Description copied from class: Quad
Create a new Quad identical to the receiver, but with all Temps renamed according to a mapping. The new Quad will have no edges.

The new Quad will come from the specified QuadFactory.

Overrides:
rename in class PHI

accept

public void accept(QuadVisitor v)
Description copied from class: Quad
Accept a visitor.

Overrides:
accept in class PHI

accept

public <T> T accept(QuadValueVisitor<T> v)
Overrides:
accept in class PHI

toString

public String toString()
Returns a human-readable representation of this quad.

Overrides:
toString in class PHI