[PATCH] D51664: [IR] Lazily number instructions for local dominance queries

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 09:45:43 PDT 2018


rnk added a comment.

In https://reviews.llvm.org/D51664#1224779, @george.burgess.iv wrote:

> When the code's more polished, would it be reasonable to also stick a verifier of this somewhere (that we maybe just run per-query or per-pass on EXPENSIVE_CHECKS builds, or something)?


We could do it if expensive checks are enabled, but I think checks in NDEBUG that don't affect the asymptotic performance are the most useful. Maybe before inserting an instruction, if the numbering was previously considered valid, we can assert that it actually was? This way, we do linear work the first time we create the ordering, and then do linear work when we invalidate it. We could also check when destroying the BB, since that also does linear work.


https://reviews.llvm.org/D51664





More information about the llvm-commits mailing list