1 //===-- VPlanDominatorTree.h ------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 /// 10 /// \file 11 /// This file implements dominator tree analysis for a single level of a VPlan's 12 /// H-CFG. 13 /// 14 //===----------------------------------------------------------------------===// 15 16 #ifndef LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H 17 #define LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H 18 19 #include "VPlan.h" 20 #include "llvm/ADT/GraphTraits.h" 21 #include "llvm/IR/Dominators.h" 22 23 namespace llvm { 24 25 /// Template specialization of the standard LLVM dominator tree utility for 26 /// VPBlockBases. 27 using VPDominatorTree = DomTreeBase<VPBlockBase>; 28 29 using VPDomTreeNode = DomTreeNodeBase<VPBlockBase>; 30 31 /// Template specializations of GraphTraits for VPDomTreeNode. 32 template <> 33 struct GraphTraits<VPDomTreeNode *> 34 : public DomTreeGraphTraitsBase<VPDomTreeNode, VPDomTreeNode::iterator> {}; 35 36 template <> 37 struct GraphTraits<const VPDomTreeNode *> 38 : public DomTreeGraphTraitsBase<const VPDomTreeNode, 39 VPDomTreeNode::const_iterator> {}; 40 } // namespace llvm 41 #endif // LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H 42