MLIR 22.0.0git
DataLayoutInterfaces.h File Reference
#include "mlir/IR/Attributes.h"
#include "mlir/IR/DialectInterface.h"
#include "mlir/IR/OpDefinition.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/Support/TypeSize.h"
#include "mlir/Interfaces/DataLayoutAttrInterface.h.inc"
#include "mlir/Interfaces/DataLayoutOpInterface.h.inc"
#include "mlir/Interfaces/DataLayoutTypeInterface.h.inc"

Go to the source code of this file.

Classes

class  mlir::DataLayoutDialectInterface
 An interface to be implemented by dialects that can have identifiers in the data layout specification entries. More...
class  mlir::DataLayout
 The main mechanism for performing data layout queries. More...

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::detail
 AttrTypeReplacer.

Typedefs

using mlir::DataLayoutEntryKey = llvm::PointerUnion<Type, StringAttr>
using mlir::DataLayoutEntryList = llvm::SmallVector<DataLayoutEntryInterface, 4>
using mlir::DataLayoutEntryListRef = llvm::ArrayRef<DataLayoutEntryInterface>
using mlir::TargetDeviceSpecListRef = llvm::ArrayRef<TargetDeviceSpecInterface>
using mlir::TargetDeviceSpecEntry = std::pair<StringAttr, TargetDeviceSpecInterface>
using mlir::DataLayoutIdentifiedEntryMap

Functions

llvm::TypeSize mlir::detail::getDefaultTypeSize (Type type, const DataLayout &dataLayout, DataLayoutEntryListRef params)
 Default handler for the type size request.
llvm::TypeSize mlir::detail::getDefaultTypeSizeInBits (Type type, const DataLayout &dataLayout, DataLayoutEntryListRef params)
 Default handler for the type size in bits request.
uint64_t mlir::detail::getDefaultABIAlignment (Type type, const DataLayout &dataLayout, ArrayRef< DataLayoutEntryInterface > params)
 Default handler for the required alignment request.
uint64_t mlir::detail::getDefaultPreferredAlignment (Type type, const DataLayout &dataLayout, ArrayRef< DataLayoutEntryInterface > params)
 Default handler for the preferred alignment request.
std::optional< uint64_t > mlir::detail::getDefaultIndexBitwidth (Type type, const DataLayout &dataLayout, ArrayRef< DataLayoutEntryInterface > params)
 Default handler for the index bitwidth request.
Attribute mlir::detail::getDefaultEndianness (DataLayoutEntryInterface entry)
 Default handler for endianness request.
Attribute mlir::detail::getDefaultMemorySpace (DataLayoutEntryInterface entry)
 Default handler for the default memory space request.
Attribute mlir::detail::getDefaultAllocaMemorySpace (DataLayoutEntryInterface entry)
 Default handler for alloca memory space request.
Attribute mlir::detail::getDefaultManglingMode (DataLayoutEntryInterface entry)
 Default handler for mangling mode request.
Attribute mlir::detail::getDefaultProgramMemorySpace (DataLayoutEntryInterface entry)
 Default handler for program memory space request.
Attribute mlir::detail::getDefaultGlobalMemorySpace (DataLayoutEntryInterface entry)
 Default handler for global memory space request.
uint64_t mlir::detail::getDefaultStackAlignment (DataLayoutEntryInterface entry)
 Default handler for the stack alignment request.
Attribute mlir::detail::getDefaultFunctionPointerAlignment (DataLayoutEntryInterface entry)
 Default handler for the function pointer alignment request.
Attribute mlir::detail::getDefaultLegalIntWidths (DataLayoutEntryInterface entry)
 Default handler for the legal int widths request.
std::optional< Attributemlir::detail::getDevicePropertyValue (DataLayoutEntryInterface entry)
 Returns the value of the property from the specified DataLayoutEntry.
DataLayoutEntryList mlir::detail::filterEntriesForType (DataLayoutEntryListRef entries, TypeID typeID)
 Given a list of data layout entries, returns a new list containing the entries with keys having the given type ID, i.e.
DataLayoutEntryInterface mlir::detail::filterEntryForIdentifier (DataLayoutEntryListRef entries, StringAttr id)
 Given a list of data layout entries, returns the entry that has the given identifier as key, if such an entry exists in the list.
TargetDeviceSpecInterface mlir::detail::filterEntryForIdentifier (TargetDeviceSpecListRef entries, StringAttr id)
 Given a list of target device entries, returns the entry that has the given identifier as key, if such an entry exists in the list.
LogicalResult mlir::detail::verifyDataLayoutOp (Operation *op)
 Verifies that the operation implementing the data layout interface, or a module operation, is valid.
LogicalResult mlir::detail::verifyDataLayoutSpec (DataLayoutSpecInterface spec, Location loc)
 Verifies that a data layout spec is valid.
LogicalResult mlir::detail::verifyTargetSystemSpec (TargetSystemSpecInterface spec, Location loc)
 Verifies that a target system desc spec is valid.
llvm::TypeSize mlir::detail::divideCeil (llvm::TypeSize numerator, uint64_t denominator)
 Divides the known min value of the numerator by the denominator and rounds the result up to the next integer.