public interface IFlowgraph
A flowgraph is a directed graph with a set of vertices, its basic blocks, and a set of edges. One vertex, the start block, is the first vertex on every path through the flowgraph.
Modifier and Type | Method and Description |
---|---|
Iterable<IBasicBlock> |
blocksInControlFlowOrder()
Get an iterator that will iterate over the blocks in the control flow
graph in control flow order.
|
int |
findLineNumber(IBasicBlock b)
Find the closest matching line number to the start of a block.
|
int |
findLineNumber(IBasicBlock b,
int initialOffset)
Find the nearest debugline instruction preceeding the given
(Block,offset) position and fetch its line number.
|
String |
findSourcePath(IBasicBlock b)
Find the nearest debugfile instruction to the start of
the given block and fetch its source path.
|
String |
findSourcePath(IBasicBlock b,
int initialOffset)
Find the nearest debugfile instruction preceeding the given
(Block,offset) position and fetch its source path.
|
IBasicBlock |
getBlock(Label l)
Get a Label's target Block.
|
List<IBasicBlock> |
getBlocksInEntryOrder()
Get the graph's blocks in their original order.
|
DominatorTree |
getDominatorTree()
Touch the graph's dominator tree and fetch it.
|
IBasicBlock |
getStartBlock()
Get the start block.
|
boolean |
isCatchTarget(IBasicBlock b)
Is the given Block a catch target?
|
boolean |
isReachable(IBasicBlock b)
Is the given Block reachable?
|
void |
removeUnreachableBlock(IBasicBlock b)
Remove an unreachable block from the CFG.
|
void |
traverseGraph(IFlowGraphVisitor visitor)
Walk a IFlowGraphVisitor over this CFG.
|
IBasicBlock getBlock(Label l)
l
- - the Label of interest.IBasicBlock getStartBlock()
boolean isCatchTarget(IBasicBlock b)
b
- - the Block of interest.Iterable<IBasicBlock> blocksInControlFlowOrder()
List<IBasicBlock> getBlocksInEntryOrder()
void traverseGraph(IFlowGraphVisitor visitor)
visitor
- - the visitor.DominatorTree getDominatorTree()
void removeUnreachableBlock(IBasicBlock b)
b
- - the Block to remove.boolean isReachable(IBasicBlock b)
b
- - the block of interest.int findLineNumber(IBasicBlock b)
b
- the block of interest.int findLineNumber(IBasicBlock b, int initialOffset)
b
- - the Block of interest.initialOffset
- - the start offset in the block.String findSourcePath(IBasicBlock b)
b
- - the Block of interest.String findSourcePath(IBasicBlock b, int initialOffset)
b
- - the Block of interest.initialOffset
- - the start offset in the block.Copyright © 2016 The Apache Software Foundation. All rights reserved.