Package com.tonic.analysis.pdg
Class PDGBuilder
- java.lang.Object
-
- com.tonic.analysis.pdg.PDGBuilder
-
public class PDGBuilder extends Object
Builder of a program dependence graph for one method, deriving control dependence from the post-dominator tree and data dependence from def-use chains.
-
-
Constructor Summary
Constructors Constructor Description PDGBuilder(IRMethod method)Creates a builder and its post-dominator tree and def-use chains, neither of which is computed yet.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PDGbuild(IRMethod method)Builds the dependence graph for a method: entry and exit regions, one node per phi and instruction, then control, data, and exception edges.Map<IRBlock,PDGNode>getBlockTerminatorNodes()DefUseChainsgetDefUseChains()IRMethodgetMethod()PDGgetPdg()PostDominatorTreegetPostDomTree()
-
-
-
Constructor Detail
-
PDGBuilder
public PDGBuilder(IRMethod method)
Creates a builder and its post-dominator tree and def-use chains, neither of which is computed yet.- Parameters:
method- the method to analyze
-
-
Method Detail
-
getMethod
public IRMethod getMethod()
- Returns:
- the method
-
getPostDomTree
public PostDominatorTree getPostDomTree()
- Returns:
- the post dom tree
-
getDefUseChains
public DefUseChains getDefUseChains()
- Returns:
- the def use chains
-
getPdg
public PDG getPdg()
- Returns:
- the pdg
-
getBlockTerminatorNodes
public Map<IRBlock,PDGNode> getBlockTerminatorNodes()
- Returns:
- the block terminator nodes
-
-