[PATCH] Make updateDFSNumbers API public

Daniel Berlin dberlin at dberlin.org
Tue Apr 14 12:10:38 PDT 2015


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)

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.

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.


On Tue, Apr 14, 2015 at 8:08 AM Chandler Carruth <chandlerc at gmail.com>
wrote:

> 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.
>
>
> http://reviews.llvm.org/D8946
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150414/4cf21093/attachment.html>


More information about the llvm-commits mailing list