<div dir="ltr"><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><div>Well, is there a high-level difference between that and the old `DT.verifyDominatorTree`?<br><br><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><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><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 11:26 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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.</div><div>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 :)</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 8:24 AM, Brian Rzycki via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">brzycki accepted this revision.<br>
brzycki added a comment.<br>
This revision is now accepted and ready to land.<br>
<br>
When working on JumpThreading I never saw a failure due to NCD verification so I think you're intuition about other checks makes sense.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D38802" rel="noreferrer" target="_blank">https://reviews.llvm.org/D3880<wbr>2</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div>Jakub Kuderski</div></div>
</div>