<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 9:31 AM, Jakub (Kuba) Kuderski <span dir="ltr"><<a href="mailto:kubakuderski@gmail.com" target="_blank">kubakuderski@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">We could also avoid the other checks, and just build dominators with the simple iterative dataflow algorithm and see if it comes out the same.</span></blockquote></span><div>Well, is there a high-level difference between that and the old `DT.verifyDominatorTree`?<span class=""><br><br></span></div></div></blockquote><div><br></div><div>Yes, the old one used the same algorithm for building and verification :)<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <span style="font-size:12.8px">The verification of tree properties is nice, though, as it guarantees correctness, while doing some other algorithm would just guarantee we maybe implemented it wrong twice :)</span></blockquote></span><div>I think that we have to verify the properties, or at least some of them, because we check that the DominatorTree is correct for the given CFG, including the attributes we augmented it with (IE levels, DFS InOut numbers). So for the validation to cover everything, we first have to check that it has exactly the nodes that correspond to the CFG nodes (reachability + roots), that the tree is the dominator tree (parent + sibling), and that the extra information matches the tree (levels + DFS numbers). If we switched solving dataflow equations, we would still have to check the remaining properties.</div></div></div></blockquote><div><br></div><div>Fair enough</div><div><br></div></div></div></div>