MLIR 22.0.0git
MemOpInterfaces.h
Go to the documentation of this file.
1//===- MemOpInterfaces.h - Memory operation interfaces ----------*- 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 declarations of interfaces for operations that interact
10// with memory.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_INTERFACES_MEMOPINTERFACES_H
15#define MLIR_INTERFACES_MEMOPINTERFACES_H
16
18
19namespace mlir {
20namespace detail {
21/// Attempt to verify the given memory space cast operation.
22LogicalResult verifyMemorySpaceCastOpInterface(Operation *op);
23
24/// Tries to bubble-down inplace a `MemorySpaceCastOpInterface` operation
25/// referenced by `operand`. On success, it returns `std::nullopt`. It
26/// returns failure if `operand` doesn't reference a
27/// `MemorySpaceCastOpInterface` op.
28FailureOr<std::optional<SmallVector<Value>>>
29bubbleDownInPlaceMemorySpaceCastImpl(OpOperand &operand, ValueRange results);
30} // namespace detail
31} // namespace mlir
32
33/// Include the generated interface declarations.
34#include "mlir/Interfaces/MemOpInterfaces.h.inc"
35
36#endif // MLIR_INTERFACES_MEMOPINTERFACES_H
AttrTypeReplacer.
FailureOr< std::optional< SmallVector< Value > > > bubbleDownInPlaceMemorySpaceCastImpl(OpOperand &operand, ValueRange results)
Tries to bubble-down inplace a MemorySpaceCastOpInterface operation referenced by operand.
LogicalResult verifyMemorySpaceCastOpInterface(Operation *op)
Attempt to verify the given memory space cast operation.
Include the generated interface declarations.