[PATCH] D142162: [Dominators] Use GraphTraits::getEntryNode instead of front(). (NFC)
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 18:09:23 PST 2023
kuhar added inline comments.
================
Comment at: llvm/include/llvm/Support/GenericDomTree.h:476
if (!isPostDominator()) {
- NodeT &Entry = A->getParent()->front();
+ NodeT &Entry = *GraphTraits<NodeT *>::getEntryNode(A);
if (A == &Entry || B == &Entry)
----------------
Consider moving the graph traits type to the class definition (together with other typedefs) or to a new trait like in D141260.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142162/new/
https://reviews.llvm.org/D142162
More information about the llvm-commits
mailing list