Class 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 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
      • build

        public static PDG build​(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.
        Parameters:
        method - the method to analyze
        Returns:
        the completed graph