|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.util.controlflowgraph.GraphNode | +--sandmark.util.controlflowgraph.BasicBlock
BasicBlock represents a basic block in a control flow graph. Some of the ideas in this class are based upon the BLOAT project from Purdue. Written by Ginger Myles, 6/6/02.
Field Summary | |
(package private) java.util.ArrayList |
domChildren
|
(package private) java.util.ArrayList |
domFrontier
|
(package private) BasicBlock |
dominator
|
(package private) BasicBlock |
fallthroughFrom
|
(package private) BasicBlock |
fallthroughTo
|
(package private) BasicBlock |
header
|
(package private) de.fub.bytecode.generic.InstructionHandle |
ih
|
(package private) java.util.ArrayList |
instructions
|
(package private) java.util.ArrayList |
pdomChildren
|
(package private) java.util.ArrayList |
pdomFrontier
|
(package private) BasicBlock |
postDominator
|
Fields inherited from class sandmark.util.controlflowgraph.GraphNode |
mBlockNum, postIndex, predecessors, preIndex, sBlockNum, successors |
Constructor Summary | |
BasicBlock(de.fub.bytecode.generic.InstructionHandle ih,
MethodCFG graph)
Constructor. |
|
BasicBlock(MethodCFG graph)
|
Method Summary | |
void |
addInst(de.fub.bytecode.generic.InstructionHandle inst)
Adds an instruction to this basic block's instruction list. |
void |
addPred(BasicBlock pred)
Adds a basic block to this basic block's predecessor list. |
void |
addSucc(BasicBlock succ)
Adds a basic block to this basic block's successor list. |
boolean |
dominates(BasicBlock block)
Returns whether or not this block dominates a given block. |
BasicBlock |
fallthrough()
|
BasicBlock |
fallthroughFrom()
|
(package private) java.util.ArrayList |
getDomChildren()
|
java.util.ArrayList |
getDomFrontier()
|
BasicBlock |
getDominator()
|
BasicBlock |
getHeader()
Returns the header associated with the block. |
de.fub.bytecode.generic.InstructionHandle |
getIH()
Returns the instruction handler associated with this block. |
java.util.ArrayList |
getInstList()
Returns this blocks instruction list. |
de.fub.bytecode.generic.InstructionHandle |
getLastInstruction()
Returns the instruction handler associated with the last instruction in the block. |
(package private) java.util.ArrayList |
getPDomChildren()
|
java.util.ArrayList |
getPDomFrontier()
|
BasicBlock |
getPostDominator()
|
boolean |
postDominates(BasicBlock block)
Returns whether or not this block post dominates a given block. |
(package private) void |
setDominator(BasicBlock block)
|
void |
setFallthrough(BasicBlock fallthrough)
|
void |
setGraph(Graph g)
Set the graph that contains this node |
void |
setHeader(BasicBlock header)
Sets the header of a basic block. |
void |
setInstructions(java.util.ArrayList instructionList)
|
(package private) void |
setPostDominator(BasicBlock block)
|
java.lang.String |
toString()
Returns a string representation of the block. |
Methods inherited from class sandmark.util.controlflowgraph.GraphNode |
getPredecessors, getSuccessors, graph, onRemoveFromGraph, postOrderIndex, preOrderIndex, setPostOrderIndex, setPreOrderIndex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
de.fub.bytecode.generic.InstructionHandle ih
java.util.ArrayList instructions
BasicBlock dominator
BasicBlock postDominator
java.util.ArrayList domChildren
java.util.ArrayList pdomChildren
java.util.ArrayList domFrontier
java.util.ArrayList pdomFrontier
BasicBlock header
BasicBlock fallthroughTo
BasicBlock fallthroughFrom
Constructor Detail |
public BasicBlock(de.fub.bytecode.generic.InstructionHandle ih, MethodCFG graph)
public BasicBlock(MethodCFG graph)
Method Detail |
public void setGraph(Graph g)
GraphNode
setGraph
in class GraphNode
public void setFallthrough(BasicBlock fallthrough)
public BasicBlock fallthrough()
public BasicBlock fallthroughFrom()
public de.fub.bytecode.generic.InstructionHandle getIH()
public de.fub.bytecode.generic.InstructionHandle getLastInstruction()
public void setHeader(BasicBlock header)
public BasicBlock getHeader()
public void addSucc(BasicBlock succ)
public void addPred(BasicBlock pred)
public void addInst(de.fub.bytecode.generic.InstructionHandle inst)
public void setInstructions(java.util.ArrayList instructionList)
public java.util.ArrayList getInstList()
public java.lang.String toString()
toString
in class GraphNode
java.util.ArrayList getDomChildren()
java.util.ArrayList getPDomChildren()
public BasicBlock getDominator()
public BasicBlock getPostDominator()
void setDominator(BasicBlock block)
void setPostDominator(BasicBlock block)
public boolean dominates(BasicBlock block)
public boolean postDominates(BasicBlock block)
public java.util.ArrayList getDomFrontier()
public java.util.ArrayList getPDomFrontier()
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |