[llvm] [Support] Use block numbers for DomTree construction (PR #101706)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 00:50:58 PDT 2024


================
@@ -60,6 +60,10 @@ struct SemiNCAInfo {
   static constexpr bool IsPostDom = DomTreeT::IsPostDominator;
   using GraphDiffT = GraphDiff<NodePtr, IsPostDom>;
 
+  template <typename T>
+  using has_number_t =
+      decltype(GraphTraits<T *>::getNumber(std::declval<T *>()));
----------------
aengelke wrote:

Good idea. It would make sense to have this in GraphTraits.h, with static_asserts in the specializations. I used `GraphHasNodeNumbers` for now, but I don't really like the naming. `GraphTraits<NodeT *>::HasNodeNumbers would (imho) be better, but would require changing every specialization... What do you think?

https://github.com/llvm/llvm-project/pull/101706


More information about the llvm-commits mailing list