public DominatorGraph <StructureNode> AnalyzeGraph() { var graph = new StructureGraphAdapter(curProc.Nodes); var reverseGraph = new ReverseGraph(curProc.Nodes); var infiniteLoops = FindInfiniteLoops(graph, curProc.EntryNode); AddPseudoEdgeFromInfiniteLoopsToExitNode(graph, infiniteLoops, curProc.ExitNode, reverseGraph); var pdg = new DominatorGraph <StructureNode>(reverseGraph, curProc.ExitNode); SetImmediatePostDominators(pdg); RemovePseudoEdgeFromInfiniteLoopsToExitNode(graph, infiniteLoops, curProc.ExitNode); return(pdg); }
private DerivedGraph BuildDerivedGraph(ICollection <StructureNode> nodes, StructureNode entryNode) { DirectedGraph <StructureNode> graph = new StructureGraphAdapter(nodes); return(new DerivedGraph(graph, entryNode, ib.BuildIntervals(graph, entryNode))); }