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

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 10:25:08 PST 2018


dmgreen added a comment.

> 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


Repository:
  rL LLVM

https://reviews.llvm.org/D43140





More information about the llvm-commits mailing list