[PATCH] D88758: [DomTree] findNearestCommonDominator: assert the nodes are in tree

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 4 14:17:51 PDT 2020


MaskRay added a comment.

In D88758#2310914 <https://reviews.llvm.org/D88758#2310914>, @kuhar wrote:

> One remaining thing: the function documentation needs to be updated:
>
>   If there is no such block then return nullptr.
>
> This is obsolete, and it may be worth mentioning that A and B must have tree nodes.

Fixed.

> Or actually, would it make sense to just make the function accept tree nodes instead of basic blocks?

There are 21 references of the function. Many don't have tree nodes around. Changing to tree nodes can inconvenience many call sites.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88758/new/

https://reviews.llvm.org/D88758



More information about the llvm-commits mailing list