[PATCH] D38802: [Dominators] Remove the NCA check

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 09:43:13 PDT 2017


On Wed, Oct 11, 2017 at 9:31 AM, Jakub (Kuba) Kuderski <
kubakuderski at gmail.com> wrote:

> 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.
>
> Well, is there a high-level difference between that and the old
> `DT.verifyDominatorTree`?
>
>
Yes, the old one used the same algorithm for building and verification :)



>  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 :)
>
> 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.
>

Fair enough
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171011/9c097c99/attachment.html>


More information about the llvm-commits mailing list