Path: blob/main/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VPlanVerifier.h
35294 views
//===-- VPlanVerifier.h -----------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7///8/// \file9/// This file declares the class VPlanVerifier, which contains utility functions10/// to check the consistency of a VPlan. This includes the following kinds of11/// invariants:12///13/// 1. Region/Block invariants:14/// - Region's entry/exit block must have no predecessors/successors,15/// respectively.16/// - Block's parent must be the region immediately containing the block.17/// - Linked blocks must have a bi-directional link (successor/predecessor).18/// - All predecessors/successors of a block must belong to the same region.19/// - Blocks must have no duplicated successor/predecessor.20///21//===----------------------------------------------------------------------===//2223#ifndef LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H24#define LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H2526namespace llvm {27class VPlan;2829/// Verify invariants for general VPlans. Currently it checks the following:30/// 1. Region/Block verification: Check the Region/Block verification31/// invariants for every region in the H-CFG.32/// 2. all phi-like recipes must be at the beginning of a block, with no other33/// recipes in between. Note that currently there is still an exception for34/// VPBlendRecipes.35bool verifyVPlanIsValid(const VPlan &Plan);3637} // namespace llvm3839#endif //LLVM_TRANSFORMS_VECTORIZE_VPLANVERIFIER_H404142