<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 15, 2017 at 8:35 AM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">See also, btw,<div><a href="https://arxiv.org/abs/1608.06462" target="_blank">https://arxiv.org/abs/1608.<wbr>06462</a><br></div><div>literally the first sentence of the abstract.</div><div><br></div><div>A flow graph G=(V,E,s) is a directed graph with a distinguished start vertex s. The dominator tree D of G is a tree rooted at s, such that a vertex v is an ancestor of a vertex w if and only if all paths from s to w include v. <br></div><div><br></div><div>Thus, it is legal, for example, to do the following with a dominator or post-dominator tree:<br></div><div><br></div><div>for each dominator tree node: </div><div>  Walk idoms back to virtual root (ignoring virtual root), put them in a set.</div><div>  Get the associated CFG node A</div><div>  for each thing in set:</div><div>     perform depth_first_search starting at A in forward or backwards direction (for dom/post-dom)</div><div>     assert that we find idom.</div></div></blockquote><div>^^^^^^^^^^^</div><div>This should be assert that we find the child idoms that are in the set.</div><div><br></div><div>Another way to look at it:<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Given a post-dom-tree</div><div class="gmail_quote"><br></div><div class="gmail_quote">A</div><div class="gmail_quote">|</div><div class="gmail_quote">B</div><div class="gmail_quote">|</div><div class="gmail_quote">C</div><div class="gmail_quote">|</div><div class="gmail_quote">D</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">We should be able to depth first search the *CFG* from D to A and *every* path we walk should contain C and B</div><div class="gmail_quote">We should be able to depth first search the *CFG* from C to A and *every* path we walk should contain B.</div><div class="gmail_quote">We should be able to depth first search the *CFG* from D to B and *every* path we walk should contain C.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div></div></div></div>