[docs]classDominanceFrontier(Analysis):""" Computes the dominance frontier of all nodes in a function graph, and provides an easy-to-use interface for querying the frontier information. """
def_get_graph(self):g=self.function.graph_ex(exception_edges=self._exception_edges)returngdef_compute(self):g=self._get_graph()# Compute the dominator treeifself.function.startpointisNone:# The function might be empty or is corrupted (maybe the object is created manually)raiseTypeError("Startpoint of function %s is None. Is this function empty?"%repr(self.function))doms=Dominators(g,self.function.startpoint)# Compute the dominance frontierdom_frontiers=compute_dominance_frontier(g,doms.dom)self.frontiers=dom_frontiers