ConstReturns the dominance frontiers as a graph: an edge n -> m for every node m in the
dominance frontier of n.
The dominance frontier of n holds the nodes where its dominance ends: m is in it if n
dominates an in-node of m but does not strictly dominate m. A node can be in its own
dominance frontier, as the header of a natural loop is, so the result can have self-loops.
Nodes that the entries do not reach have empty dominance frontiers and are in none.
Uses the algorithm of Cooper, Harvey and Kennedy. The result is computed anew on every call, not cached: keep it to use it more than once. It can grow quadratically with the node count, for example on deeply nested do-while loops.
Time: O(nodeCount + edgeCount + frontierCount), where frontierCount is the number of edges of the result. Memory: 4 x (nodeCount + frontierCount) bytes for the result; while it runs, as much again and 8 x nodeCount bytes more.
the dominators of the control-flow graph
the dominance frontiers, with the node IDs of the graph of dominators
Relations of control flow that follow from
Dominators, returned as graphs: the dominance frontiers and, from them, control dependence.A block is control dependent on another if that block decides whether it runs. Control dependence is the transposed graph of the dominance frontiers of the post-dominators. The post-dominators are the dominators of the transposed graph with the exits as entries. Here, for a method
loadwith a for loop and an if in it, whose control flowcfgends in the blockexit:For the placement of phi-nodes, IteratedDominanceFrontier answers without building the dominance frontiers.