|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.common.Root scale.score.Note scale.score.chords.Chord scale.score.chords.SequentialChord scale.score.chords.ExprChord scale.score.chords.PhiExprChord
public class PhiExprChord
This class is used to represent a node in a CFG that contains a PhiExpr expression.
$Id: PhiExprChord.java,v 1.29 2007-10-04 19:58:23 burrill Exp $
Copyright 2007 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
PhiExpr
Field Summary |
---|
Fields inherited from class scale.score.chords.Chord |
---|
lineNumber |
Constructor Summary | |
---|---|
PhiExprChord(Expr rhs)
Create a node that holds a computation. |
|
PhiExprChord(Expr rhs,
Chord next)
Create a node that holds a computation. |
|
PhiExprChord(Expr lhs,
Expr rhs)
Create a node that holds a computation. |
|
PhiExprChord(Expr lhs,
Expr rhs,
Chord next)
Create a node that holds a Phi function computation. |
Method Summary | |
---|---|
Chord |
copy()
Make a copy of this CFG node with the same out-going CFG edges. |
static int |
created()
Return the number of instances of this class that were created. |
DColor |
getDisplayColorHint()
Return a String specifying the color to use for coloring this node in a graphical display. |
PhiExpr |
getPhiFunction()
Return the Phi function of this Chord. |
boolean |
isPhiExpr()
Return true if this chord is a PhiExprChord. |
boolean |
isSpecial()
Return true if this is chord was added for the convenience of the compiler and does not correspond to actual source code in the user program. |
void |
visit(Predicate p)
Process a node by calling its associated routine. |
Methods inherited from class scale.score.chords.ExprChord |
---|
addDefUse, addMayDef, changeInDataEdge, checkDefUse, deleteInDataEdges, executionCostEstimate, getCall, getDeclList, getDefExpr, getDefUse, getDefUseArray, getExprList, getInDataEdge, getInDataEdgeArray, getLoadExprList, getLValue, getMayDef, getPredicate, getRValue, isAssignChord, isDefined, isExprChord, isVaCopy, numDefUseLinks, numInDataEdges, predicatedOnTrue, printDefUse, pushInDataEdges, recordRefs, removeDefUse, removeDualExprs, removePredication, removeRefs, removeUseDef, replaceDecl, setLValue, setRValue, setVaCopy, sideEffects, singleDefUse, specifyPredicate, toStringSpecial, validate |
Methods inherited from class scale.score.chords.SequentialChord |
---|
changeOutCfgEdge, clearEdge, clearEdgeMarkers, deleteOutCfgEdges, edgeMarked, getNextChord, getOutCfgEdge, getOutCfgEdgeArray, getTarget, indexOfOutCfgEdge, isLastInBasicBlock, isSequential, linkSubgraph, linkTo, markEdge, numOutCfgEdges, pushAllOutCfgEdges, pushOutCfgEdges, pushOutCfgEdges, pushSortedOutCfgEdges, pushSortedOutCfgEdges, replaceOutCfgEdge, setTarget, setTargetUnsafe |
Methods inherited from class scale.score.Note |
---|
getChord, getEssentialUse, setAnnotationLevel, setReportLevel, toString |
Methods inherited from class scale.common.Root |
---|
addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayName, getDisplayString, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, hashCode, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass, trace, trace, trace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PhiExprChord(Expr lhs, Expr rhs, Chord next)
lhs
- is the target of the assignment or null
rhs
- is the source expression for the assignment or null
next
- is the out-going CFG edge and may be nullpublic PhiExprChord(Expr rhs, Chord next)
rhs
- is the source expression or null
next
- is the out-going CFG edge and may be nullpublic PhiExprChord(Expr rhs)
rhs
- is the source expression or null
public PhiExprChord(Expr lhs, Expr rhs)
lhs
- is the target of the assignment or null
rhs
- is the source expression for the assignment or
null
Method Detail |
---|
public static int created()
public Chord copy()
Chord
copy
in class ExprChord
public PhiExpr getPhiFunction()
public boolean isSpecial()
isSpecial
in class Chord
public final boolean isPhiExpr()
isPhiExpr
in class Chord
public void visit(Predicate p)
Note
Each class has a visit(Predicate p)
method. For
example, in class ABC
:
public void visit(Predicate p) { p.visitABC(this); }and the class that implements
Predicate
has a method
public void visitABC(Note n) { ABC a = (ABC) n; ... }Thus, the class that implements
Predicate
can call
n.visit(this);where
n
is a Note
sub-class without
determining which specific sub-class n
is.
The visit pattern basically avoids implementing a large
switch
statement or defining different methods
in each class for some purpose.
visit
in class ExprChord
Predicate
public DColor getDisplayColorHint()
getDisplayColorHint
in interface DisplayNode
getDisplayColorHint
in class Chord
DColor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |