[all-commits] [llvm/llvm-project] 31d46c: [Dominators] Introduce DomTreeNodeTraits to allow ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sun Jan 22 12:24:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 31d46ca8aa07c4bb94f9e823289173aae43a3f76
      https://github.com/llvm/llvm-project/commit/31d46ca8aa07c4bb94f9e823289173aae43a3f76
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-01-22 (Sun, 22 Jan 2023)

  Changed paths:
    M llvm/include/llvm/Support/GenericDomTree.h
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanCFG.h
    M llvm/lib/Transforms/Vectorize/VPlanDominatorTree.h

  Log Message:
  -----------
  [Dominators] Introduce DomTreeNodeTraits to allow customization. (NFC)

This patch introduces DomTreeNodeTraits for customization. Clients can implement
DomTreeNodeTraitsCustom to provide custom ParentPtr, getEntryNode and getParent.
There's also a default specialization if DomTreeNodeTraitsCustom is not implemented,
that assume a Function-like NodeT. This is what is used for the existing DominatorTree
and MachineDominatorTree.

The main motivation for this patch is using DominatorTreeBase across all
regions of a VPlan, see D140513.

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D142162




More information about the All-commits mailing list