MLIR  20.0.0git
MemorySlotInterfaces.h
Go to the documentation of this file.
1 //===-- Mem2RegInterfaces.h - Mem2Reg 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 #ifndef MLIR_INTERFACES_MEMORYSLOTINTERFACES_H
10 #define MLIR_INTERFACES_MEMORYSLOTINTERFACES_H
11 
12 #include "mlir/IR/Dominance.h"
13 #include "mlir/IR/OpDefinition.h"
14 #include "mlir/IR/PatternMatch.h"
15 
16 namespace mlir {
17 
18 /// Represents a slot in memory. This is generated by an allocating operation
19 /// (for example alloca).
20 struct MemorySlot {
21  /// Pointer to the memory slot, used by operations to refer to it.
23  /// Type of the value contained in the slot.
25 };
26 
27 /// Memory slot attached with information about its destructuring procedure.
29  /// Maps an index within the memory slot to the corresponding subelement type.
31 };
32 
33 /// Returned by operation promotion logic requesting the deletion of an
34 /// operation.
35 enum class DeletionKind {
36  /// Keep the operation after promotion.
37  Keep,
38  /// Delete the operation after promotion.
39  Delete,
40 };
41 
42 } // namespace mlir
43 
44 #include "mlir/Interfaces/MemorySlotOpInterfaces.h.inc"
45 #include "mlir/Interfaces/MemorySlotTypeInterfaces.h.inc"
46 
47 #endif // MLIR_INTERFACES_MEMORYSLOTINTERFACES_H
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Definition: Types.h:74
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition: Value.h:96
Include the generated interface declarations.
DeletionKind
Returned by operation promotion logic requesting the deletion of an operation.
@ Keep
Keep the operation after promotion.
@ Delete
Delete the operation after promotion.
Memory slot attached with information about its destructuring procedure.
DenseMap< Attribute, Type > subelementTypes
Maps an index within the memory slot to the corresponding subelement type.
Represents a slot in memory.
Value ptr
Pointer to the memory slot, used by operations to refer to it.
Type elemType
Type of the value contained in the slot.