org.jikesrvm.compilers.opt.depgraph
Class DepGraphNode

java.lang.Object
  extended by org.jikesrvm.compilers.opt.util.SpaceEffGraphNode
      extended by org.jikesrvm.compilers.opt.depgraph.DepGraphNode
All Implemented Interfaces:
DepGraphConstants, GraphElement, GraphNode

public final class DepGraphNode
extends SpaceEffGraphNode
implements DepGraphConstants

Dependence graph node: there is one for each instruction in a basic block.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraphNode
SpaceEffGraphNode.GraphEdgeEnumeration<T extends GraphEdge>, SpaceEffGraphNode.OutEdgeEnumeration
 
Field Summary
 Instruction _instr
          Instruction that this node represents.
 
Fields inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraphNode
_inEdgeEnd, _inEdgeStart, _outEdgeEnd, _outEdgeStart, info, next, nextSorted, prev, scratch, scratchObject
 
Fields inherited from interface org.jikesrvm.compilers.opt.depgraph.DepGraphConstants
COMPACT, CONTROL, EXCEPTION_E, EXCEPTION_ML, EXCEPTION_MS, EXCEPTION_R, GUARD_ANTI, GUARD_OUTPUT, GUARD_TRUE, MEM_ANTI, MEM_OUTPUT, MEM_READS_KILL, MEM_TRUE, REG_ANTI, REG_MAY_DEF, REG_OUTPUT, REG_TRUE, SEQ
 
Constructor Summary
DepGraphNode(Instruction instr)
          Constructor.
 
Method Summary
 void insertOutEdge(DepGraphNode node, int type)
          Add an out edge from this node to the given node.
 void insertRegTrueOutEdge(DepGraphNode node, RegisterOperand op)
          Add an out edge this node to the given node because of a register true dependence of a given operand.
 Instruction instruction()
          Get the instruction this node represents.
 String toString()
          Returns the string representation of this node.
 
Methods inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraphNode
_sortDFS, _sortRevTop, _sortTop, append, appendInEdge, appendOutEdge, clearDfsVisited, clearFlags, clearInFlags, clearLoopHeader, clearOnStack, clearOutFlags, clearTopVisited, deleteIn, deleteOut, deleteOut, deleteOut, dfsVisited, findOutEdgeTo, firstInEdge, firstInNode, firstOutEdge, firstOutNode, flagsOn, getIndex, getNext, getNumber, getNumberOfIn, getNumberOfOut, getPrev, getScratch, hasIn, hasOneIn, hasOneIn, hasOneOut, hasOneOut, hasOut, hasZeroIn, hasZeroOut, inEdges, inNodes, insertOut, insertOut, isLoopHeader, markDFN, markSCC, onStack, outEdges, outNodes, pointsIn, pointsOut, printExtended, printInEdges, printInNodes, printOutEdges, printOutNodes, remove, removeIn, removeIn, removeOut, removeOut, replaceInEdge, replaceOut, setDfsVisited, setDfsVisitedOnStack, setIndex, setLoopHeader, setNumber, setOnStack, setScratch, setTopVisited, sortDFS, sortRevTop, sortTop, topVisited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_instr

public final Instruction _instr
Instruction that this node represents.

Constructor Detail

DepGraphNode

public DepGraphNode(Instruction instr)
Constructor.

Parameters:
instr - the instruction this node represents
Method Detail

instruction

public Instruction instruction()
Get the instruction this node represents.

Returns:
instruction this node represents

toString

public String toString()
Returns the string representation of this node.

Overrides:
toString in class Object
Returns:
string representation of this node

insertOutEdge

public void insertOutEdge(DepGraphNode node,
                          int type)
Add an out edge from this node to the given node.

Parameters:
node - destination node for the edge
type - the type of the edge to add

insertRegTrueOutEdge

public void insertRegTrueOutEdge(DepGraphNode node,
                                 RegisterOperand op)
Add an out edge this node to the given node because of a register true dependence of a given operand.

Parameters:
node - destination node for the edge
op - the operand of node that is defined by this edge