EDU.purdue.cs.bloat.tree
Class PhiJoinStmt

java.lang.Object
  |
  +--EDU.purdue.cs.bloat.tree.Node
        |
        +--EDU.purdue.cs.bloat.tree.Stmt
              |
              +--EDU.purdue.cs.bloat.tree.PhiStmt
                    |
                    +--EDU.purdue.cs.bloat.tree.PhiJoinStmt

public class PhiJoinStmt
extends PhiStmt

PhiJoinStmt represents a phi-function inserted into a control flow graph during conversion of variables to static single-assignment form. A PhiJoinStmt at a point of control flow convergence.

See Also:
SSAConstructionInfo

Fields inherited from class EDU.purdue.cs.bloat.tree.Node
parent
 
Constructor Summary
PhiJoinStmt(VarExpr target, Block block)
          Constructor.
 
Method Summary
 int numOperands()
          Returns the number of operands that this PhiJoinStmt has.
 Expr operandAt(Block block)
          Returns the occurrence of the variable with which this PhiJoinStmt is concerned (usually represented by a VarExpr) at a given block.
 java.util.Collection operands()
          Returns the operands of this PhiJoinStmt.
 java.util.Collection preds()
          Returns the predacessor nodes (in the CFG not dominator graph) of the block in which this PhiJoinStmt occurs.
 void setOperandAt(Block block, Expr expr)
          Set the operand to this PhiJoinStmt for a given Block to a given expression.
 void visit(TreeVisitor visitor)
           
 void visitForceChildren(TreeVisitor visitor)
          Visit the children of this node.
 
Methods inherited from class EDU.purdue.cs.bloat.tree.PhiStmt
clone, defs, target
 
Methods inherited from class EDU.purdue.cs.bloat.tree.Stmt
cleanupOnly
 
Methods inherited from class EDU.purdue.cs.bloat.tree.Node
block, cleanup, copyInto, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visitChildren, visitOnly
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhiJoinStmt

public PhiJoinStmt(VarExpr target,
                   Block block)
Constructor.
Parameters:
target - The target of this PhiStmt.
block - The basic Block in which this PhiJoinStmt resides.
Method Detail

setOperandAt

public void setOperandAt(Block block,
                         Expr expr)
Set the operand to this PhiJoinStmt for a given Block to a given expression.
Parameters:
block -  
expr -  

operandAt

public Expr operandAt(Block block)
Returns the occurrence of the variable with which this PhiJoinStmt is concerned (usually represented by a VarExpr) at a given block.
Parameters:
block - The block at which an occurrence of the variable occurs.
See Also:
VarExpr

numOperands

public int numOperands()
Returns the number of operands that this PhiJoinStmt has.

preds

public java.util.Collection preds()
Returns the predacessor nodes (in the CFG not dominator graph) of the block in which this PhiJoinStmt occurs.

operands

public java.util.Collection operands()
Returns the operands of this PhiJoinStmt. They are usually of type VarExpr.
Overrides:
operands in class PhiStmt
See Also:
VarExpr

visitForceChildren

public void visitForceChildren(TreeVisitor visitor)
Description copied from class: Node
Visit the children of this node. Not all Nodes will have children to visit.
Overrides:
visitForceChildren in class Node

visit

public void visit(TreeVisitor visitor)
Overrides:
visit in class Node