|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.util.SpaceEffGraph org.jikesrvm.compilers.opt.depgraph.DepGraph
public final class DepGraph
Dependence Graph for a single basic block in the program.
Field Summary | |
---|---|
private BasicBlock |
currentBlock
The basic block we are processing |
private LiveSet |
handlerLiveSet
Set of variables that are live on entry to at least one catch block that is reachable via a PEI in currentBlock. |
private IR |
ir
The IR we are processing |
Fields inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraph |
---|
_firstNode, _lastNode, backwardTopSorted, forwardTopSorted, numberOfNodes |
Constructor Summary | |
---|---|
DepGraph(IR ir,
Instruction start,
Instruction end,
BasicBlock currentBlock)
Constructor (computes the dependence graph!). |
Method Summary | |
---|---|
private void |
clearRegisters(Instruction start,
Instruction end)
Initialize (clear) the dNode field in Register for all registers in this basic block by setting them to null. |
private void |
computeBackwardDependences(Instruction start,
Instruction end)
Compute anti dependences by doing a backwards traversal of the instructions from start to end. |
private void |
computeBackwardDependencesDef(Operand op,
DepGraphNode destNode,
DepGraphNode lastExceptionNode)
Compute backward dependences from a given def to a given node. |
private void |
computeBackwardDependencesUse(Operand op,
DepGraphNode destNode,
DepGraphNode lastExceptionNode)
Compute backward dependences from a given use to a given node. |
private void |
computeControlAndBarrierDependences(Instruction start,
Instruction end)
Compute control and barrier (acquire/release) dependences in two passes (one forward, one reverse over the instructions from start to end. |
private void |
computeForwardDependences(Instruction start,
Instruction end)
Compute flow and output dependences by doing a forward traversal of the instructions from start to end. |
private void |
computeForwardDependencesDef(Operand op,
DepGraphNode destNode,
DepGraphNode lastExceptionNode)
Compute forward dependences from a given def to a given node. |
private void |
computeForwardDependencesUse(Operand op,
DepGraphNode destNode,
DepGraphNode lastExceptionNode)
Compute forward dependences from a given use to a given node. |
private void |
computeHandlerLiveSet()
Determine the set of variables live on entry to any handler block that is reachable from currentBlock |
private void |
computeImplicitBackwardDependencesDef(Register r,
DepGraphNode destNode)
Compute implicit backward dependences from a given register def to a given node. |
private void |
computeImplicitBackwardDependencesUse(Register r,
DepGraphNode destNode)
Compute implicit backward dependences from a given register use to a given node. |
private void |
computeImplicitForwardDependencesDef(Register r,
DepGraphNode destNode)
Compute implicit forward dependences from a given register def to a given node. |
private void |
computeImplicitForwardDependencesUse(Register r,
DepGraphNode destNode)
Compute implicit forward dependences from a given register use to a given node. |
private void |
createNodes(Instruction start,
Instruction end)
Create the dependency graph nodes for instructions start to end |
private LocationOperand |
getLocation(Instruction s)
Get the location of a given load or store instruction. |
void |
printDepGraph()
Print the dependence graph to standard out. |
Methods inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraph |
---|
addGraphEdge, addGraphEdge, addGraphNode, addRootNode, addTopSortNode, allocateNodeNumber, buildRevTopSort, buildTopSort, clearDFS, compactNodeNumbering, enumerateNodes, firstNode, initTopSort, isTopSorted, lastNode, numberOfNodes, printDepthFirst, removeGraphNode, resetTopSorted, rootNodes, setFirstNode, setLastNode, setNumberOfNodes, setTopSorted, startNode, topSort, topSortOrder, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final LiveSet handlerLiveSet
private final BasicBlock currentBlock
private final IR ir
Constructor Detail |
---|
public DepGraph(IR ir, Instruction start, Instruction end, BasicBlock currentBlock)
ir
- the IR to compute the dependence graph forstart
- instruction to start computation fromend
- instruction to end computation atcurrentBlock
- the basic block that the instructions are living inMethod Detail |
---|
private void computeHandlerLiveSet()
private void createNodes(Instruction start, Instruction end)
private void computeForwardDependences(Instruction start, Instruction end)
private void computeBackwardDependences(Instruction start, Instruction end)
private void computeControlAndBarrierDependences(Instruction start, Instruction end)
private void computeForwardDependencesUse(Operand op, DepGraphNode destNode, DepGraphNode lastExceptionNode)
op
- source operanddestNode
- destination nodelastExceptionNode
- node representing the last PEIprivate void computeForwardDependencesDef(Operand op, DepGraphNode destNode, DepGraphNode lastExceptionNode)
op
- source operanddestNode
- destination nodelastExceptionNode
- node representing the last PEIprivate void computeBackwardDependencesUse(Operand op, DepGraphNode destNode, DepGraphNode lastExceptionNode)
op
- source operanddestNode
- destination nodelastExceptionNode
- node representing the last PEIprivate void computeBackwardDependencesDef(Operand op, DepGraphNode destNode, DepGraphNode lastExceptionNode)
op
- source operanddestNode
- destination nodelastExceptionNode
- node representing the last PEIprivate void computeImplicitForwardDependencesUse(Register r, DepGraphNode destNode)
r
- source registerdestNode
- destination nodeprivate void computeImplicitForwardDependencesDef(Register r, DepGraphNode destNode)
r
- source registerdestNode
- destination nodeprivate void computeImplicitBackwardDependencesUse(Register r, DepGraphNode destNode)
r
- source registerdestNode
- destination nodeprivate void computeImplicitBackwardDependencesDef(Register r, DepGraphNode destNode)
r
- source registerdestNode
- destination nodeprivate LocationOperand getLocation(Instruction s)
s
- the instruction to get the location from.private void clearRegisters(Instruction start, Instruction end)
start
- the first opt instruction in the regionend
- the last opt instruction in the regionpublic void printDepGraph()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |