MLIR  18.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 type of the pointer that
30  /// will be generated to access the element directly.
32 };
33 
34 /// Returned by operation promotion logic requesting the deletion of an
35 /// operation.
36 enum class DeletionKind {
37  /// Keep the operation after promotion.
38  Keep,
39  /// Delete the operation after promotion.
40  Delete,
41 };
42 
43 } // namespace mlir
44 
45 #include "mlir/Interfaces/MemorySlotOpInterfaces.h.inc"
46 #include "mlir/Interfaces/MemorySlotTypeInterfaces.h.inc"
47 
48 #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 > elementPtrs
Maps an index within the memory slot to the type of the pointer that will be generated to access the ...
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.