[PATCH] D36167: [Dominators] Introduce batch updates

Brian Rzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 08:25:09 PDT 2017


brzycki accepted this revision.
brzycki added a comment.
This revision is now accepted and ready to land.

The work I am doing to preserve dominance over JumpThreading.cpp and Local.cpp will directly benefit from this new interface. When inserting/removing conditional branch or invoke terminators the only valid option was to perform DT->recalculate(*F) which is expensive. In the case of conditional branches this is also fairly frequent. Being able to queue both insertions and deletions also minimizes the fixup calls.

Kuba, I saw your comments saying the new interface is, in general, more efficient to apply a single batch update vs Insert/Delete. Is it worth the effort for callers to *not* call .applyUpdates() when we know our vector is of size = 1?



================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:83
+    // Note that these children are from the future relative to what the
+    // DominatorTree knows about -- using them to gets us some snapshot of the
+    // CFG from the past (relative to the state of the CFG).
----------------
"using them to gets us" is confusing and grammatically incorrect. I think you meant to say something like "using them gets us a partial snapshot of the..."


https://reviews.llvm.org/D36167





More information about the llvm-commits mailing list