|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.core.ProcedureMap
The ProcedureMap class represents a mapping from basic blocks
to the procedures that contain them. Built by the ProcedureMapBuilder
class and accessible through the ControlFlowGraph.getProcedureMap(),
the ProcedureMap, the mapping is built by first recognized
static call sites and marking their target basic blocks as procedure entry
points. Those entrypoints are propagated through the control flow graph
to all reachable basic blocks (ignoring call edges). If a basic block is
reachable through more than one procedure entry, it is considered shared.
The result is a conservative approximation of which basic blocks are in
which procedure. Given a basic block, this class can look up the basic
block which represents the entrypoint of that procedure. Also, given
the entrypoint of a procedure, the class can return a collection of
the basic blocks that are reachable from that entrypoint.
Interrupt handlers are not considered the entrypoints of procedures.
Program,
ControlFlowGraph| Field Summary | |
protected java.util.HashMap |
entryMap
|
protected java.util.HashSet |
entryPoints
|
protected java.util.HashMap |
procMap
|
| Method Summary | |
java.util.Collection |
getProcedureBlocks(ControlFlowGraph.Block entry)
The getProcedureBlocks() method returns the collection of basic
blocks contained in the procedure with the specified entrypoint. |
ControlFlowGraph.Block |
getProcedureContaining(ControlFlowGraph.Block b)
The getProcedureContaining() method looks up the entrypoint
of the procedure that contains this basic block. |
java.util.Collection |
getProcedureEntrypoints()
The getProcedureEntrypoints() method returns a collection of
basic blocks that are entrypoints of procedures in the control flow graph. |
boolean |
isInAnyProcedure(ControlFlowGraph.Block b)
The isInAnyProcedure() method queries whether the specified
basic block is reachable from any procedure entry point in the program. |
boolean |
isSharedBetweenProcedures(ControlFlowGraph.Block b)
The isSharedBetweenProcedures() method queries whether the
specified basic block is reachable from more than one procedure entrypoint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final java.util.HashSet entryPoints
protected final java.util.HashMap entryMap
protected final java.util.HashMap procMap
| Method Detail |
public boolean isInAnyProcedure(ControlFlowGraph.Block b)
isInAnyProcedure() method queries whether the specified
basic block is reachable from any procedure entry point in the program.
b - the basic block to query
public boolean isSharedBetweenProcedures(ControlFlowGraph.Block b)
isSharedBetweenProcedures() method queries whether the
specified basic block is reachable from more than one procedure entrypoint.
b - the basic block to query
public ControlFlowGraph.Block getProcedureContaining(ControlFlowGraph.Block b)
getProcedureContaining() method looks up the entrypoint
of the procedure that contains this basic block. If the block is not in
any procedure, or if the block is shared by multiple procedures, then this
method returns null.
b - the basic block to find the procedure of
ControlFlowGraph.Block instance
that is the entrypoint of the procedure containing the specified basic block;
null otherwisepublic java.util.Collection getProcedureBlocks(ControlFlowGraph.Block entry)
getProcedureBlocks() method returns the collection of basic
blocks contained in the procedure with the specified entrypoint. If the
block passed is not the entrypoint of any procedure, this method will return
null.
entry - the basic block representing the entrypoint of the procedure
public java.util.Collection getProcedureEntrypoints()
getProcedureEntrypoints() method returns a collection of
basic blocks that are entrypoints of procedures in the control flow graph.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||