|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.Quads.Quad
harpoon.IR.Quads.PHI
public class PHI
PHI
objects represent blocks of phi functions.
Field Summary | |
---|---|
protected Temp[] |
dst
dst[i] is the left-hand side of the i'th phi function in this block. |
protected Temp[][] |
src
src[i][j] is the j'th parameter to the i'th phi function in this block. |
Fields inherited from class harpoon.IR.Quads.Quad |
---|
arrayFactory |
Constructor Summary | |
---|---|
PHI(QuadFactory qf,
HCodeElement source,
Temp[] dst,
int arity)
Creates a PHI object with the specified arity. |
|
PHI(QuadFactory qf,
HCodeElement source,
Temp[] dst,
Temp[][] src,
int arity)
Creates a PHI object representing a block of
phi functions. |
Method Summary | ||
---|---|---|
|
accept(QuadValueVisitor<T> v)
|
|
void |
accept(QuadVisitor v)
Accept a visitor. |
|
int |
arity()
Returns the number of arguments each phi function has. |
|
Temp[] |
def()
Returns all the Temps defined by this Quad. |
|
Temp |
dst(int nPhi)
Returns the right hand side of the nPhi 'th phi
function assignment in the block. |
|
PHI |
grow(Temp[] args,
int which_pred)
Grow the arity of a PHI by one by replacing it. |
|
boolean |
hasConflicts()
Returns true if any of the sources of any of the phi functions match a destination of a phi function. |
|
int |
kind()
Return an integer enumeration of the kind of this Quad . |
|
int |
numPhis()
Returns the number of phi functions in the block. |
|
void |
removePhi(int nPhi)
Deprecated. does not preserve immutability. |
|
void |
removePred(int which_pred)
Deprecated. does not preserve immutability. |
|
Quad |
rename(QuadFactory qqf,
TempMap defMap,
TempMap useMap)
Create a new Quad identical to the receiver, but
with all Temp s renamed according to a mapping. |
|
PHI |
shrink(int which_pred)
Shrink the arity of a PHI by replacing it. |
|
Temp[] |
src(int nPhi)
Returns an array holding the arguments to the nPhi 'th
phi function in the block. |
|
Temp |
src(int nPhi,
int nParam)
Returns the nParam 'th argument of the
nPhi 'th phi function in the block. |
|
String |
toString()
Returns a human-readable representation of this Quad. |
|
Temp[] |
use()
Returns all the Temp s used by this Quad . |
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 |
---|
protected Temp[] dst
protected Temp[][] src
Constructor Detail |
---|
public PHI(QuadFactory qf, HCodeElement source, Temp[] dst, Temp[][] src, int arity)
PHI
object representing a block of
phi functions.
dst
- the left hand sides of a phi function assignment block.src
- the phi function parameters in a phi function assignment block.public PHI(QuadFactory qf, HCodeElement source, Temp[] dst, int arity)
PHI
object with the specified arity.
Each phi function will have arity
arguments.
dst
- the left hand sides of the phi functions.arity
- the number of predecessors of this quad.Method Detail |
---|
public Temp dst(int nPhi)
nPhi
'th phi
function assignment in the block.
public Temp src(int nPhi, int nParam)
nParam
'th argument of the
nPhi
'th phi function in the block.
public Temp[] src(int nPhi)
nPhi
'th
phi function in the block.
public int numPhis()
public int arity()
public void removePhi(int nPhi)
public void removePred(int which_pred)
public PHI shrink(int which_pred)
public PHI grow(Temp[] args, int which_pred)
public Temp[] use()
Temp
s used by this Quad
.
use
in interface UseDefable
use
in class Quad
public Temp[] def()
def
in interface UseDefable
def
in class Quad
public int kind()
Quad
Quad
. The enumerated values are defined in
QuadKind
.
kind
in class Quad
public Quad rename(QuadFactory qqf, TempMap defMap, TempMap useMap)
Quad
Quad
identical to the receiver, but
with all Temp
s renamed according to a mapping.
The new Quad
will have no edges.
The new Quad
will come from the specified
QuadFactory
.
rename
in class Quad
public boolean hasConflicts()
public void accept(QuadVisitor v)
Quad
accept
in class Quad
public <T> T accept(QuadValueVisitor<T> v)
accept
in class Quad
public String toString()
toString
in class Quad
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |