[PATCH] D43140: [Dominators] Always recalculate postdominators when update yields different roots

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 10:33:39 PST 2018


kuhar added a comment.

In https://reviews.llvm.org/D43140#1005362, @dmgreen wrote:

> > But any idea why verifyRoots did not catch this case already?
>
> Ah, I see. The roots were the same as newly calculated roots, but roots and the tree didn't match up. What do you think about adding a check for that to verifyRoots? (Not in this commit, I'm just throwing around ideas here). Or do you think a check against the recalculated tree is good enough? Something like:
>
>   for each node in tree:
>     if node in roots:
>       check node->idom == virtual root
>     else
>       check node->idom != virtual root
>


Yes, I think that is missing from the current implementation.


Repository:
  rL LLVM

https://reviews.llvm.org/D43140





More information about the llvm-commits mailing list