MLIR
23.0.0git
include
mlir
Dialect
Utils
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
18
#include "
mlir/IR/BuiltinTypes.h
"
19
#include "
mlir/IR/Operation.h
"
20
#include "
mlir/Support/LLVM.h
"
21
22
namespace
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.
27
LogicalResult
verifyDynamicDimensionCount
(
Operation
*op, ShapedType type,
28
ValueRange
dynamicSizes);
29
30
}
// namespace mlir
31
32
#endif
// MLIR_DIALECT_UTILS_VERIFICATIONUTILS_H
Operation.h
mlir::Operation
Operation is the basic unit of execution within MLIR.
Definition
Operation.h:88
mlir::ValueRange
This class provides an abstraction over the different types of ranges over Values.
Definition
ValueRange.h:387
BuiltinTypes.h
LLVM.h
mlir
Include the generated interface declarations.
Definition
AliasAnalysis.h:19
mlir::verifyDynamicDimensionCount
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...
Definition
VerificationUtils.cpp:13
Generated on
for MLIR by
1.14.0