VPlanDominatorTree.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifndef LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H
  15. #define LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H
  16. #include "VPlan.h"
  17. #include "llvm/ADT/GraphTraits.h"
  18. #include "llvm/IR/Dominators.h"
  19. namespace llvm {
  20. /// Template specialization of the standard LLVM dominator tree utility for
  21. /// VPBlockBases.
  22. using VPDominatorTree = DomTreeBase<VPBlockBase>;
  23. using VPDomTreeNode = DomTreeNodeBase<VPBlockBase>;
  24. /// Template specializations of GraphTraits for VPDomTreeNode.
  25. template <>
  26. struct GraphTraits<VPDomTreeNode *>
  27. : public DomTreeGraphTraitsBase<VPDomTreeNode,
  28. VPDomTreeNode::const_iterator> {};
  29. template <>
  30. struct GraphTraits<const VPDomTreeNode *>
  31. : public DomTreeGraphTraitsBase<const VPDomTreeNode,
  32. VPDomTreeNode::const_iterator> {};
  33. } // namespace llvm
  34. #endif // LLVM_TRANSFORMS_VECTORIZE_VPLANDOMINATORTREE_H