MLIR 24.0.0git
MemorySlotInterfacesImpl.h
Go to the documentation of this file.
1//===- MemorySlotOpInterfaceImpl.h - Mem2Reg for MemRef ops -----*- 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#ifndef MLIR_DIALECT_MEMREF_TRANSFORMS_MEMORYSLOTOPINTERFACEIMPL_H
10#define MLIR_DIALECT_MEMREF_TRANSFORMS_MEMORYSLOTOPINTERFACEIMPL_H
11
12#include "mlir/IR/Value.h"
13
14namespace mlir {
15class DialectRegistry;
16class Location;
17class OpBuilder;
18
19namespace memref {
20void registerMemorySlotOpInterfaceExternalModels(DialectRegistry &registry);
21
22/// Returns whether `slotPtr` is a dynamic `memref.subview` that can be promoted
23/// as an alias of the whole parent vector.
24bool isDynamicSubViewSlot(Value slotPtr);
25
26/// Builds a mask for the subview's valid region in the parent vector, or
27/// returns null if `isDynamicSubViewSlot(slotPtr)` is false.
28Value buildDynamicSubViewMask(OpBuilder &builder, Location loc, Value slotPtr);
29} // namespace memref
30} // namespace mlir
31
32#endif // MLIR_DIALECT_MEMREF_TRANSFORMS_MEMORYSLOTOPINTERFACEIMPL_H
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
Definition Location.h:76
This class helps build Operations.
Definition Builders.h:210
void registerMemorySlotOpInterfaceExternalModels(DialectRegistry &registry)
Value buildDynamicSubViewMask(OpBuilder &builder, Location loc, Value slotPtr)
Builds a mask for the subview's valid region in the parent vector, or returns null if isDynamicSubVie...
bool isDynamicSubViewSlot(Value slotPtr)
Returns whether slotPtr is a dynamic memref.subview that can be promoted as an alias of the whole par...
Include the generated interface declarations.