[PATCH] D48383: [Dominators] Add the DomTreeUpdater class

Chijun Sima via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 09:23:07 PDT 2018


NutshellySima added inline comments.


================
Comment at: include/llvm/IR/DomTreeUpdater.h:116
+  /// This function should be called when the class holds a PostDomTree.
+  void recalculatePostDomTree(Function &F);
+  /// Recalculate Both of the trees.
----------------
kuhar wrote:
> Similar to above.
> One more thing: why do we expose these function? Is it possible that someone wants to recalculate just one tree and leave the other one intact? If this is the case, can you explain when it would make sense?
As mentioned in the DeferredDomiance document, the DT traversal algorithm needs all BasicBlocks awaiting deletion be deleted before it determines the actual DT. So there should be such recalculate* functions to determine whether to leave the other tree intact (check whether there are BasicBlocks awaiting deletion).


https://reviews.llvm.org/D48383





More information about the llvm-commits mailing list