[PATCH] D141260: [Dominators] Remove requirement to use NodeRef->getParent().

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 07:09:23 PST 2023


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/include/llvm/Support/GenericDomTree.h:228-229
+/// T::getParent's return type otherwise.
+template <typename T, typename = void> struct dt_get_parent_ptr_ty {
+  using type = decltype(std::declval<T>()->getParent());
+};
----------------
kuhar wrote:
> What do you think about making this a little bit more general, say: `struct DominatorTreeNodeTraits` and moving `NodePtr`/`ParentType`/`GraphTraits` (from D142162) there as well?
I updated  D142162 to add a `DomTreeNodeTraits` class with a customization option. Is that along the lines you had in mind?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141260



More information about the llvm-commits mailing list