LLVM 20.0.0git
VPlanDominatorTree.h
Go to the documentation of this file.
1//===-- VPlanDominatorTree.h ------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// This file implements dominator tree analysis for a single level of a VPlan's
11/// H-CFG.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H
16#define LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H
17
18#include "VPlan.h"
19#include "VPlanCFG.h"
21#include "llvm/IR/Dominators.h"
23
24namespace llvm {
25
26template <> struct DomTreeNodeTraits<VPBlockBase> {
29 using ParentPtr = VPlan *;
30
31 static NodePtr getEntryNode(ParentPtr Parent) { return Parent->getEntry(); }
32 static ParentPtr getParent(NodePtr B) { return B->getPlan(); }
33};
34
35/// Template specialization of the standard LLVM dominator tree utility for
36/// VPBlockBases.
37class VPDominatorTree : public DominatorTreeBase<VPBlockBase, false> {
39
40public:
41 VPDominatorTree() = default;
42
43 /// Returns true if \p A properly dominates \p B.
44 bool properlyDominates(const VPRecipeBase *A, const VPRecipeBase *B);
45};
46
48
49/// Template specializations of GraphTraits for VPDomTreeNode.
50template <>
54
55template <>
59} // namespace llvm
60#endif // LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H
aarch64 promote const
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file defines a set of templates that efficiently compute a dominator tree over a generic graph.
This file defines the little GraphTraits<X> template class that should be specialized by classes that...
This file contains the declarations of the Vectorization Plan base classes:
typename SmallVector< DomTreeNodeBase *, 4 >::const_iterator const_iterator
Core dominator tree base class.
VPBlockBase is the building block of the Hierarchical Control-Flow Graph.
Definition: VPlan.h:396
Template specialization of the standard LLVM dominator tree utility for VPBlockBases.
bool properlyDominates(const VPRecipeBase *A, const VPRecipeBase *B)
Returns true if A properly dominates B.
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.
Definition: VPlan.h:720
VPlan models a candidate for vectorization, encoding various decisions take to produce efficient outp...
Definition: VPlan.h:3761
VPBasicBlock * getEntry()
Definition: VPlan.h:3869
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
DomTreeNodeBase< VPBlockBase > VPDomTreeNode
static NodePtr getEntryNode(ParentPtr Parent)
static ParentPtr getParent(NodePtr B)
Default DomTreeNode traits for NodeT.