19 #include "llvm/ADT/SmallString.h"
20 #include "llvm/ADT/TypeSwitch.h"
29 void PtrDialect::initialize() {
32 #include "mlir/Dialect/Ptr/IR/PtrOps.cpp.inc"
35 #define GET_ATTRDEF_LIST
36 #include "mlir/Dialect/Ptr/IR/PtrOpsAttrs.cpp.inc"
39 #define GET_TYPEDEF_LIST
40 #include "mlir/Dialect/Ptr/IR/PtrOpsTypes.cpp.inc"
62 llvm::TypeSize TypeOffsetOp::getTypeSize(std::optional<DataLayout> layout) {
73 #include "mlir/Dialect/Ptr/IR/PtrOpsDialect.cpp.inc"
75 #define GET_ATTRDEF_CLASSES
76 #include "mlir/Dialect/Ptr/IR/PtrOpsAttrs.cpp.inc"
78 #include "mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.cpp.inc"
80 #include "mlir/Dialect/Ptr/IR/MemorySpaceAttrInterfaces.cpp.inc"
82 #include "mlir/Dialect/Ptr/IR/PtrOpsEnums.cpp.inc"
84 #define GET_TYPEDEF_CLASSES
85 #include "mlir/Dialect/Ptr/IR/PtrOpsTypes.cpp.inc"
87 #define GET_OP_CLASSES
88 #include "mlir/Dialect/Ptr/IR/PtrOps.cpp.inc"
static Value getBase(Value v)
Looks through known "view-like" ops to find the base memref.
static Type getElementType(Type type, ArrayRef< int32_t > indices, function_ref< InFlightDiagnostic(StringRef)> emitErrorFn)
Walks the given type hierarchy with the given indices, potentially down to component granularity,...
Attributes are known-constant values of operations.
The main mechanism for performing data layout queries.
static DataLayout closest(Operation *op)
Returns the layout of the closest parent operation carrying layout info.
llvm::TypeSize getTypeSize(Type t) const
Returns the size of the given type in the current scope.
This class represents a single result from folding an operation.
Include the generated interface declarations.
detail::constant_int_value_binder m_ConstantInt(IntegerAttr::ValueType *bind_value)
Matches a constant holding a scalar/vector/tensor integer (splat) and writes the integer value to bin...
bool match(Attribute attr)