<div dir="ltr">Not recalculating if valid exposes a bug in maintenance of the DFSInfoValid flag (which is very hard to trigger,  but expensive debugging has a check that catches it on two out of the 13000 testcases we have because it requires passes to recalculate the dom tree and then do something with it)<br><br>I am submitting the change without that part (IE just moving updateDFSNumbers), then submitting a bug fix (coming) to maintain the flag properly and add the check back along with a unit test.<div><div><br>The bug is that GenericDomTree::recalculate never sets DFSInfoValid = false, but calls DT.updateDFSNumbers at the end, expecting it will always recalculate the DFS numbers.</div><div><br></div></div></div><br><div class="gmail_quote">On Tue, Apr 14, 2015 at 8:08 AM Chandler Carruth <<a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">LGTM. We should consider documenting this and teaching people to use it like they would use vector::reserve when they *know* they're going to make mor ethan 32 queries and it doesn't make sense to have the first 32 be slow.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D8946" target="_blank">http://reviews.llvm.org/D8946</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>