1 //===-- VPlanVerifier.h -----------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
10 /// This file declares the class VPlanVerifier, which contains utility functions
11 /// to check the consistency of a VPlan. This includes the following kinds of
14 /// 1. Region/Block invariants:
15 /// - Region's entry/exit block must have no predecessors/successors,
17 /// - Block's parent must be the region immediately containing the block.
18 /// - Linked blocks must have a bi-directional link (successor/predecessor).
19 /// - All predecessors/successors of a block must belong to the same region.
20 /// - Blocks must have no duplicated successor/predecessor.
22 //===----------------------------------------------------------------------===//
24 #ifndef LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H
25 #define LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H
30 /// Verify invariants for general VPlans. Currently it checks the following:
31 /// 1. Region/Block verification: Check the Region/Block verification
32 /// invariants for every region in the H-CFG.
33 /// 2. all phi-like recipes must be at the beginning of a block, with no other
34 /// recipes in between. Note that currently there is still an exception for
36 bool verifyVPlanIsValid(const VPlan
&Plan
);
40 #endif //LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H