1 //===-- VPlanVerifier.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// This file declares the class VPlanVerifier, which contains utility functions
12 /// to check the consistency of a VPlan. This includes the following kinds of
15 /// 1. Region/Block invariants:
16 /// - Region's entry/exit block must have no predecessors/successors,
18 /// - Block's parent must be the region immediately containing the block.
19 /// - Linked blocks must have a bi-directional link (successor/predecessor).
20 /// - All predecessors/successors of a block must belong to the same region.
21 /// - Blocks must have no duplicated successor/predecessor.
23 //===----------------------------------------------------------------------===//
25 #ifndef LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H
26 #define LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H
32 /// Class with utility functions that can be used to check the consistency and
33 /// invariants of a VPlan, including the components of its H-CFG.
36 /// Verify the invariants of the H-CFG starting from \p TopRegion. The
37 /// verification process comprises the following steps:
38 /// 1. Region/Block verification: Check the Region/Block verification
39 /// invariants for every region in the H-CFG.
40 void verifyHierarchicalCFG(const VPRegionBlock *TopRegion) const;
44 #endif //LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H