MLIR 23.0.0git
VerificationUtils.h
Go to the documentation of this file.
1//===- VerificationUtils.h - Common verification utilities ------*- 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// This header file defines common verification utilities that can be shared
10// across multiple MLIR dialects. These utilities help reduce code duplication
11// for common verification patterns.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef MLIR_DIALECT_UTILS_VERIFICATIONUTILS_H
16#define MLIR_DIALECT_UTILS_VERIFICATIONUTILS_H
17
19#include "mlir/IR/Operation.h"
20#include "mlir/Support/LLVM.h"
21
22namespace mlir {
23
24/// Verify that the number of dynamic size operands matches the number of
25/// dynamic dimensions in the shaped type. Returns failure and emits an error
26/// if the counts don't match.
27LogicalResult verifyDynamicDimensionCount(Operation *op, ShapedType type,
28 ValueRange dynamicSizes);
29
30} // namespace mlir
31
32#endif // MLIR_DIALECT_UTILS_VERIFICATIONUTILS_H
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88
This class provides an abstraction over the different types of ranges over Values.
Definition ValueRange.h:387
Include the generated interface declarations.
LogicalResult verifyDynamicDimensionCount(Operation *op, ShapedType type, ValueRange dynamicSizes)
Verify that the number of dynamic size operands matches the number of dynamic dimensions in the shape...