[PATCH] D33584: Remove a quadratic behavior in assert-enabled builds

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 10:22:41 PDT 2017


anemet added a comment.

In https://reviews.llvm.org/D33584#765763, @dberlin wrote:

> As I said last year, i believe, we should just remove this assert.
>  It doesn't help anything. The callers literally  can't  handle it any better if they want real dominance answers.


I thought GVN was a good counter example which bails early in the presence of duplicated edges: https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Scalar/GVN.cpp#L1733

> There isn't anywhere else in llvm we assert because "a thing may become quadratic if you do dumb things", and the assert itself is quadratic.

Is it the problem that dominates is quadratic or that it returns the wrong answer in the presence of duplicated edges?


https://reviews.llvm.org/D33584





More information about the llvm-commits mailing list