Module type Dominator.S
type dom_frontier= vertex -> vertex listfunction from
xto a list of nodes not dominated byx, but with predecessors which are dominated byx
val compute_idom : t -> vertex -> vertex -> vertexComputes the dominator tree, using the Lengauer-Tarjan algorithm.
compute_idom cfg s0returns a functionidom : V.t -> V.ts.t.idom xreturns the immediate dominator ofx.
val dominators_to_dom : ('a -> S.t) -> vertex -> 'a -> boolGiven a function from a node to it's dominators, returns a function
dom : V.t -> V.t -> bools.t.dom x yreturns true whenxdominatesy.
val dominators_to_sdom : (vertex -> S.t) -> vertex -> vertex -> boolGiven a function from a node to it's dominators, returns a function
sdom : V.t -> V.t -> bools.t.sdom x yreturns true whenxstrictly dominatesy.
val dom_to_sdom : (vertex -> vertex -> bool) -> vertex -> vertex -> boolval dominators_to_sdominators : (vertex -> S.t) -> vertex -> S.tGiven a a function from a node to it's dominators, returns a function from a node to it's strict dominators.
val dominators_to_idoms : (vertex -> S.t) -> vertex -> vertex -> boolGiven a function from a node to it's dominators, returns a function
idoms : vertex -> vertex -> bools.t.idoms x yreturns true whenxis the immediate dominator ofy.
val dominators_to_dom_tree : t -> ?pred:(t -> vertex -> vertex list) -> (vertex -> S.t) -> vertex -> S.tComputes a dominator tree (function from x to a list of nodes immediately dominated by x) for the given CFG and dominator function. Note: The dominator tree is also called
IDomby Muchnick. Note: If you are computing a post-dominator tree, then the optional argument pred should be G.succ.
val idom_to_dom_tree : t -> (vertex -> vertex) -> vertex -> vertex listComputes a dominator tree (function from x to a list of nodes immediately dominated by x) for the given CFG and idom function.