1//===- CastInterfaces.h - Cast Interfaces for MLIR --------------*- 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 file contains the definitions of the cast interfaces defined in
10// `CastInterfaces.td`.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_INTERFACES_CASTINTERFACES_H
15#define MLIR_INTERFACES_CASTINTERFACES_H
16
17#include "mlir/IR/OpDefinition.h"
18
19namespace mlir {
20class DialectRegistry;
21
22namespace impl {
23/// Attempt to fold the given cast operation.
24LogicalResult foldCastInterfaceOp(Operation *op,
25 ArrayRef<Attribute> attrOperands,
26 SmallVectorImpl<OpFoldResult> &foldResults);
27
28/// Attempt to verify the given cast operation.
29LogicalResult verifyCastInterfaceOp(Operation *op);
30} // namespace impl
31
32namespace builtin {
33void registerCastOpInterfaceExternalModels(DialectRegistry &registry);
34} // namespace builtin
35} // namespace mlir
36
37/// Include the generated interface declarations.
38#include "mlir/Interfaces/CastInterfaces.h.inc"
39
40#endif // MLIR_INTERFACES_CASTINTERFACES_H
41

source code of mlir/include/mlir/Interfaces/CastInterfaces.h