MLIR: lib/Interfaces/DataLayoutInterfaces.cpp File Reference (original) (raw)

#include "[mlir/Interfaces/DataLayoutInterfaces.h](DataLayoutInterfaces%5F8h%5Fsource.html)"
#include "[mlir/IR/BuiltinDialect.h](BuiltinDialect%5F8h%5Fsource.html)"
#include "[mlir/IR/BuiltinOps.h](BuiltinOps%5F8h%5Fsource.html)"
#include "[mlir/IR/BuiltinTypes.h](mlir%5F2IR%5F2BuiltinTypes%5F8h%5Fsource.html)"
#include "[mlir/IR/Operation.h](IR%5F2Operation%5F8h%5Fsource.html)"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/MathExtras.h"
#include "mlir/Interfaces/DataLayoutAttrInterface.cpp.inc"
#include "mlir/Interfaces/DataLayoutOpInterface.cpp.inc"
#include "mlir/Interfaces/DataLayoutTypeInterface.cpp.inc"

Go to the source code of this file.

Functions
static void reportMissingDataLayout (Type type)
Reports that the given type is missing the data layout information and exits.
static uint64_t getIndexBitwidth (DataLayoutEntryListRef params)
Returns the bitwidth of the index type if specified in the param list.
static DataLayoutEntryInterface findEntryForIntegerType (IntegerType intType, ArrayRef< DataLayoutEntryInterface > params)
static uint64_t extractABIAlignment (DataLayoutEntryInterface entry)
static uint64_t getIntegerTypeABIAlignment (IntegerType intType, ArrayRef< DataLayoutEntryInterface > params)
static uint64_t getFloatTypeABIAlignment (FloatType fltType, const DataLayout &dataLayout, ArrayRef< DataLayoutEntryInterface > params)
static uint64_t extractPreferredAlignment (DataLayoutEntryInterface entry)
static uint64_t getIntegerTypePreferredAlignment (IntegerType intType, const DataLayout &dataLayout, ArrayRef< DataLayoutEntryInterface > params)
static uint64_t getFloatTypePreferredAlignment (FloatType fltType, const DataLayout &dataLayout, ArrayRef< DataLayoutEntryInterface > params)
static DataLayoutSpecInterface getSpec (Operation *operation)
static TargetSystemSpecInterface getTargetSystemSpec (Operation *operation)
static void collectParentLayouts (Operation *leaf, SmallVectorImpl< DataLayoutSpecInterface > &specs, SmallVectorImpl< Location > *opLocations=nullptr)
Populates opsWithLayout with the list of proper ancestors of leaf that are either modules or implement the DataLayoutOpInterface.
static DataLayoutSpecInterface getCombinedDataLayout (Operation *leaf)
Returns a layout spec that is a combination of the layout specs attached to the given operation and all its ancestors.
template
void checkMissingLayout (DataLayoutSpecInterface originalLayout, OpTy op)
template
static T cachedLookup (Type t, DenseMap< Type, T > &cache, function_ref< T(Type)> compute)
Looks up the value for the given type key in the given cache.
Variables
constexpr static const uint64_t kDefaultBitsInByte = 8u

cachedLookup()

checkMissingLayout()

template

void checkMissingLayout ( DataLayoutSpecInterface originalLayout,
OpTy op )

collectParentLayouts()

extractABIAlignment()

uint64_t extractABIAlignment ( DataLayoutEntryInterface entry) static

extractPreferredAlignment()

uint64_t extractPreferredAlignment ( DataLayoutEntryInterface entry) static

findEntryForIntegerType()

DataLayoutEntryInterface findEntryForIntegerType ( IntegerType intType, ArrayRef< DataLayoutEntryInterface > params ) static

getCombinedDataLayout()

DataLayoutSpecInterface getCombinedDataLayout ( Operation * leaf) static

getFloatTypeABIAlignment()

uint64_t getFloatTypeABIAlignment ( FloatType fltType, const DataLayout & dataLayout, ArrayRef< DataLayoutEntryInterface > params ) static

getFloatTypePreferredAlignment()

uint64_t getFloatTypePreferredAlignment ( FloatType fltType, const DataLayout & dataLayout, ArrayRef< DataLayoutEntryInterface > params ) static

getIndexBitwidth()

getIntegerTypeABIAlignment()

uint64_t getIntegerTypeABIAlignment ( IntegerType intType, ArrayRef< DataLayoutEntryInterface > params ) static

getIntegerTypePreferredAlignment()

uint64_t getIntegerTypePreferredAlignment ( IntegerType intType, const DataLayout & dataLayout, ArrayRef< DataLayoutEntryInterface > params ) static

getSpec()

DataLayoutSpecInterface getSpec ( Operation * operation) static

getTargetSystemSpec()

TargetSystemSpecInterface getTargetSystemSpec ( Operation * operation) static

reportMissingDataLayout()

void reportMissingDataLayout ( Type type) static

kDefaultBitsInByte

const uint64_t kDefaultBitsInByte = 8u staticconstexpr