[PATCH] D124904: [DomPrinter] migrate -dot-dom to the new pass manager

YangKeao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 7 01:34:39 PDT 2022


YangKeao marked 2 inline comments as done.
YangKeao added inline comments.


================
Comment at: llvm/include/llvm/Analysis/PostDominators.h:123-126
+    if (getEntryNode(N))
+      return df_begin(getEntryNode(N));
+    else
+      return df_end(getEntryNode(N));
----------------
Meinersbur wrote:
> [style] Don’t use else after a return
> 
> Can `DT.getRootNode()` actually return nullptr? AFAIK it always creates a virtual root node.
If it's constructed through the default constructor, the `RootNode` will be nullptr, and the default constructor is only used by the wrapper passes. It seems fine to assume it's not null. I'll remove the condition.


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

https://reviews.llvm.org/D124904



More information about the llvm-commits mailing list