MLIR
21.0.0git
|
Namespaces | |
detail | |
Classes | |
class | DINodeAttr |
This class represents the base attribute for all debug info attributes. More... | |
class | DIScopeAttr |
This class represents a LLVM attribute that describes a debug info scope. More... | |
class | DILocalScopeAttr |
This class represents a LLVM attribute that describes a local debug info scope. More... | |
class | DITypeAttr |
This class represents a LLVM attribute that describes a debug info type. More... | |
class | DIVariableAttr |
This class represents a LLVM attribute that describes a debug info variable. More... | |
class | TBAANodeAttr |
Base class for LLVM attributes participating in the TBAA graph. More... | |
class | GEPIndicesAdaptor |
Class used for convenient access and iteration over GEP indices. More... | |
class | GEPArg |
Class used for building a 'llvm.getelementptr'. More... | |
struct | AssumeAlignTag |
struct | AssumeSeparateStorageTag |
class | MergeFragments |
Adjacent DW_OP_LLVM_fragment should be merged into one. More... | |
class | DIExpressionRewriter |
Rewriter for DIExpressionAttr. More... | |
class | ModuleToObject |
Utility base class for transforming operations into binary objects, by default it returns the serialized LLVM bitcode for the module. More... | |
class | ModuleImport |
Module import implementation class that provides methods to import globals and functions from an LLVM module into an MLIR module. More... | |
class | ModuleTranslation |
Implementation class for module translation. More... | |
class | TypeFromLLVMIRTranslator |
Utility class to translate LLVM IR types to the MLIR LLVM dialect. More... | |
class | TypeToLLVMIRTranslator |
Utility class to translate MLIR LLVM dialect types to LLVM IR. More... | |
Typedefs | |
using | GEPConstantIndex = llvm::PointerEmbeddedInt< int32_t, kGEPConstantBitWidth > |
Wrapper around a int32_t for use in a PointerUnion. More... | |
Enumerations | |
enum class | PtrDLEntryPos { Size = 0 , Abi = 1 , Preferred = 2 , Index = 3 } |
The positions of different values in the data layout entry for pointers. More... | |
Functions | |
SmallVector< Value > | decomposeValue (OpBuilder &builder, Location loc, Value src, Type dstType) |
Decomposes a src value into a set of values of type dstType through series of bitcasts and vector ops. More... | |
Value | composeValue (OpBuilder &builder, Location loc, ValueRange src, Type dstType) |
Composes a set of src values into a single value of type dstType through series of bitcasts and vector ops. More... | |
Value | getStridedElementPtr (OpBuilder &builder, Location loc, const LLVMTypeConverter &converter, MemRefType type, Value memRefDesc, ValueRange indices, LLVM::GEPNoWrapFlags noWrapFlags=LLVM::GEPNoWrapFlags::none) |
Performs the index computation to get to the element at indices of the memory pointed to by memRefDesc , using the layout map of type . More... | |
LogicalResult | createPrintStrCall (OpBuilder &builder, Location loc, ModuleOp moduleOp, StringRef symbolName, StringRef string, const LLVMTypeConverter &typeConverter, bool addNewline=true, std::optional< StringRef > runtimeFunctionName={}) |
Generate IR that prints the given string to stdout. More... | |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintI64Fn (OpBuilder &b, Operation *moduleOp) |
Helper functions to look up or create the declaration for commonly used external C function calls. More... | |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintU64Fn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintF16Fn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintBF16Fn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintF32Fn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintF64Fn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintStringFn (OpBuilder &b, Operation *moduleOp, std::optional< StringRef > runtimeFunctionName={}) |
Declares a function to print a C-string. More... | |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintOpenFn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintCloseFn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintCommaFn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreatePrintNewlineFn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreateMallocFn (OpBuilder &b, Operation *moduleOp, Type indexType) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreateAlignedAllocFn (OpBuilder &b, Operation *moduleOp, Type indexType) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreateFreeFn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreateGenericAllocFn (OpBuilder &b, Operation *moduleOp, Type indexType) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreateGenericAlignedAllocFn (OpBuilder &b, Operation *moduleOp, Type indexType) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreateGenericFreeFn (OpBuilder &b, Operation *moduleOp) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreateMemRefCopyFn (OpBuilder &b, Operation *moduleOp, Type indexType, Type unrankedDescriptorType) |
FailureOr< LLVM::LLVMFuncOp > | lookupOrCreateFn (OpBuilder &b, Operation *moduleOp, StringRef name, ArrayRef< Type > paramTypes={}, Type resultType={}, bool isVarArg=false, bool isReserved=false) |
Create a FuncOp with signature resultType (paramTypes )and name name`. More... | |
Value | createGlobalString (Location loc, OpBuilder &builder, StringRef name, StringRef value, Linkage linkage) |
Create an LLVM global containing the string "value" at the module containing surrounding the insertion point of builder. More... | |
bool | satisfiesLLVMModule (Operation *op) |
LLVM requires some operations to be inside of a Module operation. More... | |
template<typename IntT = int64_t> | |
SmallVector< IntT > | convertArrayToIndices (ArrayRef< Attribute > attrs) |
Convert an array of integer attributes to a vector of integers that can be used as indices in LLVM operations. More... | |
template<typename IntT = int64_t> | |
SmallVector< IntT > | convertArrayToIndices (ArrayAttr attrs) |
Convert an ArrayAttr of integer attributes to a vector of integers that can be used as indices in LLVM operations. More... | |
DEFINE_TRIVIAL_LLVM_TYPE (LLVMVoidType, "llvm.void") | |
DEFINE_TRIVIAL_LLVM_TYPE (LLVMTokenType, "llvm.token") | |
DEFINE_TRIVIAL_LLVM_TYPE (LLVMLabelType, "llvm.label") | |
DEFINE_TRIVIAL_LLVM_TYPE (LLVMMetadataType, "llvm.metadata") | |
ParseResult | parsePrettyLLVMType (AsmParser &p, Type &type) |
Parse any MLIR type or a concise syntax for LLVM types. More... | |
void | printPrettyLLVMType (AsmPrinter &p, Type type) |
Print any MLIR type or a concise syntax for LLVM types. More... | |
bool | isCompatibleType (Type type) |
Returns true if the given type is compatible with the LLVM dialect. More... | |
bool | isCompatibleOuterType (Type type) |
Returns true if the given outer type is compatible with the LLVM dialect without checking its potential nested types such as struct elements. More... | |
bool | isCompatibleFloatingPointType (Type type) |
Returns true if the given type is a floating-point type compatible with the LLVM dialect. More... | |
bool | isCompatibleVectorType (Type type) |
Returns true if the given type is a vector type compatible with the LLVM dialect. More... | |
llvm::ElementCount | getVectorNumElements (Type type) |
Returns the element count of any LLVM-compatible vector type. More... | |
bool | isScalableVectorType (Type vectorType) |
Returns whether a vector type is scalable or not. More... | |
Type | getVectorType (Type elementType, unsigned numElements, bool isScalable=false) |
Creates an LLVM dialect-compatible vector type with the given element type and length. More... | |
Type | getVectorType (Type elementType, const llvm::ElementCount &numElements) |
Creates an LLVM dialect-compatible vector type with the given element type and length. More... | |
llvm::TypeSize | getPrimitiveTypeSizeInBits (Type type) |
Returns the size of the given primitive LLVM dialect-compatible type (including vectors) in bits, for example, the size of i16 is 16 and the size of vector<4xi16> is 64. More... | |
std::optional< uint64_t > | extractPointerSpecValue (Attribute attr, PtrDLEntryPos pos) |
Returns the value that corresponds to named position pos from the data layout entry attr assuming it's a dense integer elements attribute. More... | |
void | legalizeDIExpressionsRecursively (Operation *op) |
Register all known legalization patterns declared here and apply them to all ops in op . More... | |
void | registerInlinerInterface (DialectRegistry ®istry) |
Register the LLVMInlinerInterface implementation of DialectInlinerInterface with the LLVM dialect. More... | |
void | ensureDistinctSuccessors (Operation *op) |
Make argument-taking successors of each block distinct. More... | |
llvm::Constant * | createSourceLocStrFromLocation (Location loc, llvm::OpenMPIRBuilder &builder, StringRef name, uint32_t &strLen) |
Create a constant string location from the MLIR Location information. More... | |
llvm::Constant * | createMappingInformation (Location loc, llvm::OpenMPIRBuilder &builder) |
Create a constant string representing the mapping information extracted from the MLIR location information. More... | |
Variables | |
constexpr int | kGEPConstantBitWidth = 29 |
Bit-width of a 'GEPConstantIndex' within GEPArg. More... | |
using mlir::LLVM::GEPConstantIndex = typedef llvm::PointerEmbeddedInt<int32_t, kGEPConstantBitWidth> |
Wrapper around a int32_t for use in a PointerUnion.
Definition at line 69 of file LLVMDialect.h.
|
strong |
The positions of different values in the data layout entry for pointers.
Enumerator | |
---|---|
Size | |
Abi | |
Preferred | |
Index |
Definition at line 136 of file LLVMTypes.h.
Value mlir::LLVM::composeValue | ( | OpBuilder & | builder, |
Location | loc, | ||
ValueRange | src, | ||
Type | dstType | ||
) |
Composes a set of src
values into a single value of type dstType
through series of bitcasts and vector ops.
Inversely to decomposeValue
, this function is used to combine multiple values into a single value.
Definition at line 448 of file Pattern.cpp.
References mlir::OpBuilder::create(), createI32Constant(), mlir::detail::enumerate(), mlir::get(), getBitWidth(), mlir::Builder::getIntegerType(), mlir::Value::getType(), and mlir::ValueRange::getType().
SmallVector<IntT> mlir::LLVM::convertArrayToIndices | ( | ArrayAttr | attrs | ) |
Convert an ArrayAttr
of integer attributes to a vector of integers that can be used as indices in LLVM operations.
Definition at line 240 of file LLVMDialect.h.
SmallVector<IntT> mlir::LLVM::convertArrayToIndices | ( | ArrayRef< Attribute > | attrs | ) |
Convert an array of integer attributes to a vector of integers that can be used as indices in LLVM operations.
Definition at line 229 of file LLVMDialect.h.
Value mlir::LLVM::createGlobalString | ( | Location | loc, |
OpBuilder & | builder, | ||
StringRef | name, | ||
StringRef | value, | ||
LLVM::Linkage | linkage | ||
) |
Create an LLVM global containing the string "value" at the module containing surrounding the insertion point of builder.
Obtain the address of that global and use it to compute the address of the first character in the string (operations inserted at the builder insertion point).
Definition at line 4310 of file LLVMDialect.cpp.
References mlir::OpBuilder::create(), mlir::get(), mlir::Builder::getContext(), mlir::OpBuilder::getInsertionBlock(), mlir::OpBuilder::getListener(), mlir::Operation::getParentOfType(), mlir::Block::getParentOp(), and mlir::Builder::getStringAttr().
llvm::Constant * mlir::LLVM::createMappingInformation | ( | Location | loc, |
llvm::OpenMPIRBuilder & | builder | ||
) |
Create a constant string representing the mapping information extracted from the MLIR location information.
Definition at line 32 of file OpenMPCommon.cpp.
References createSourceLocStrFromLocation().
Referenced by mapParentWithMembers(), processMapMembersWithParent(), and processOperands().
LogicalResult mlir::LLVM::createPrintStrCall | ( | OpBuilder & | builder, |
Location | loc, | ||
ModuleOp | moduleOp, | ||
StringRef | symbolName, | ||
StringRef | string, | ||
const LLVMTypeConverter & | typeConverter, | ||
bool | addNewline = true , |
||
std::optional< StringRef > | runtimeFunctionName = {} |
||
) |
Generate IR that prints the given string to stdout.
If a custom runtime function is defined via runtimeFunctionName
, it must have the signature void(char const*). The default function is printString
.
Definition at line 30 of file PrintCallHelper.cpp.
References mlir::OpBuilder::create(), ensureSymbolNameIsUnique(), mlir::get(), mlir::DenseElementsAttr::get(), mlir::Builder::getContext(), mlir::Builder::getI8Type(), lookupOrCreatePrintStringFn(), mlir::OpBuilder::restoreInsertionPoint(), mlir::OpBuilder::saveInsertionPoint(), and mlir::OpBuilder::setInsertionPointToStart().
llvm::Constant * mlir::LLVM::createSourceLocStrFromLocation | ( | Location | loc, |
llvm::OpenMPIRBuilder & | builder, | ||
StringRef | name, | ||
uint32_t & | strLen | ||
) |
Create a constant string location from the MLIR Location information.
Definition at line 16 of file OpenMPCommon.cpp.
Referenced by createMappingInformation(), and createSourceLocationInfo().
SmallVector< Value > mlir::LLVM::decomposeValue | ( | OpBuilder & | builder, |
Location | loc, | ||
Value | src, | ||
Type | dstType | ||
) |
Decomposes a src
value into a set of values of type dstType
through series of bitcasts and vector ops.
Src and dst types are expected to be int or float types or vector types of them.
Definition at line 409 of file Pattern.cpp.
References mlir::OpBuilder::create(), createI32Constant(), mlir::get(), getBitWidth(), mlir::Builder::getIntegerType(), and mlir::Value::getType().
mlir::LLVM::DEFINE_TRIVIAL_LLVM_TYPE | ( | LLVMLabelType | , |
"llvm.label" | |||
) |
mlir::LLVM::DEFINE_TRIVIAL_LLVM_TYPE | ( | LLVMMetadataType | , |
"llvm.metadata" | |||
) |
mlir::LLVM::DEFINE_TRIVIAL_LLVM_TYPE | ( | LLVMTokenType | , |
"llvm.token" | |||
) |
mlir::LLVM::DEFINE_TRIVIAL_LLVM_TYPE | ( | LLVMVoidType | , |
"llvm.void" | |||
) |
void mlir::LLVM::ensureDistinctSuccessors | ( | Operation * | op | ) |
Make argument-taking successors of each block distinct.
PHI nodes in LLVM IR use the predecessor ID to identify which value to take. They do not support different values coming from the same predecessor. If a block has another block as a successor more than once with different values, insert a new dummy block for LLVM PHI nodes to tell the sources apart.
Definition at line 68 of file LegalizeForExport.cpp.
References mlir::Operation::getRegions(), and mlir::Operation::walk().
std::optional< uint64_t > mlir::LLVM::extractPointerSpecValue | ( | Attribute | attr, |
PtrDLEntryPos | pos | ||
) |
Returns the value that corresponds to named position pos
from the data layout entry attr
assuming it's a dense integer elements attribute.
Returns std::nullopt
if pos
is not present in the entry. Currently only PtrDLEntryPos::Index
is optional, and all other positions may be assumed to be present.
Definition at line 266 of file LLVMTypes.cpp.
Referenced by getPointerDataLayoutEntry().
llvm::TypeSize mlir::LLVM::getPrimitiveTypeSizeInBits | ( | Type | type | ) |
Returns the size of the given primitive LLVM dialect-compatible type (including vectors) in bits, for example, the size of i16 is 16 and the size of vector<4xi16> is 64.
Returns 0 for non-primitive (aggregates such as struct) or types that don't have a size (such as void).
Definition at line 857 of file LLVMTypes.cpp.
References isCompatibleType(), and isCompatibleVectorType().
Value mlir::LLVM::getStridedElementPtr | ( | OpBuilder & | builder, |
Location | loc, | ||
const LLVMTypeConverter & | converter, | ||
MemRefType | type, | ||
Value | memRefDesc, | ||
ValueRange | indices, | ||
LLVM::GEPNoWrapFlags | noWrapFlags = LLVM::GEPNoWrapFlags::none |
||
) |
Performs the index computation to get to the element at indices
of the memory pointed to by memRefDesc
, using the layout map of type
.
The indices are linearized as: base_offset + index_0 * stride_0 + ... + index_n * stride_n
.
Definition at line 487 of file Pattern.cpp.
References mlir::MemRefDescriptor::bufferPtr(), mlir::LLVMTypeConverter::convertType(), mlir::OpBuilder::create(), mlir::MemRefDescriptor::getElementPtrType(), mlir::Builder::getIndexAttr(), mlir::LLVMTypeConverter::getIndexType(), and mlir::MemRefDescriptor::stride().
Referenced by mlir::ConvertToLLVMPattern::getStridedElementPtr().
llvm::ElementCount mlir::LLVM::getVectorNumElements | ( | Type | type | ) |
Returns the element count of any LLVM-compatible vector type.
Definition at line 827 of file LLVMTypes.cpp.
Referenced by getI1SameShape(), and verifyExtOp().
Creates an LLVM dialect-compatible vector type with the given element type and length.
Definition at line 848 of file LLVMTypes.cpp.
References getVectorType().
Creates an LLVM dialect-compatible vector type with the given element type and length.
Definition at line 841 of file LLVMTypes.cpp.
References mlir::get().
Referenced by getI1SameShape(), getIndexedPtrs(), getVectorType(), and parseShuffleType().
bool mlir::LLVM::isCompatibleFloatingPointType | ( | Type | type | ) |
Returns true
if the given type is a floating-point type compatible with the LLVM dialect.
Definition at line 809 of file LLVMTypes.cpp.
Referenced by isTypeCompatibleWithAtomicOp().
bool mlir::LLVM::isCompatibleOuterType | ( | Type | type | ) |
Returns true
if the given outer type is compatible with the LLVM dialect without checking its potential nested types such as struct elements.
Definition at line 705 of file LLVMTypes.cpp.
bool mlir::LLVM::isCompatibleType | ( | Type | type | ) |
Returns true
if the given type is compatible with the LLVM dialect.
This is an alias to LLVMDialect::isCompatibleType
.
Definition at line 796 of file LLVMTypes.cpp.
References mlir::Type::getContext(), mlir::MLIRContext::getLoadedDialect(), and isCompatibleImpl().
Referenced by areAllLLVMTypes(), buildLLVMFunctionType(), mlir::LLVMTypeConverter::convertFunctionTypeCWrapper(), dispatchPrint(), mlir::LLVM::detail::extractNDVectorTypeInfo(), getInsertExtractValueElementType(), getPrimitiveTypeSizeInBits(), mlir::LLVM::detail::intrinsicRewrite(), mlir::LLVMTypeConverter::LLVMTypeConverter(), optionallyTruncateOrExtend(), mlir::LLVMTypeConverter::packFunctionResults(), mlir::LLVMTypeConverter::packOperationResults(), parseCmpOp(), mlir::StructBuilder::StructBuilder(), and mlir::LLVM::detail::vectorOneToOneRewrite().
bool mlir::LLVM::isCompatibleVectorType | ( | Type | type | ) |
Returns true
if the given type is a vector type compatible with the LLVM dialect.
Compatible types include 1D built-in vector types of built-in integers and floating-point values, LLVM dialect fixed vector types of LLVM dialect pointers and LLVM dialect scalable vector types.
Definition at line 814 of file LLVMTypes.cpp.
Referenced by mlir::LLVM::detail::extractNDVectorTypeInfo(), getI1SameShape(), getPrimitiveTypeSizeInBits(), parseShuffleType(), and verifyExtOp().
bool mlir::LLVM::isScalableVectorType | ( | Type | vectorType | ) |
Returns whether a vector type is scalable or not.
Definition at line 835 of file LLVMTypes.cpp.
Referenced by parseShuffleType().
void mlir::LLVM::legalizeDIExpressionsRecursively | ( | Operation * | op | ) |
Register all known legalization patterns declared here and apply them to all ops in op
.
Definition at line 52 of file DIExpressionLegalization.cpp.
References mlir::LLVM::DIExpressionRewriter::addPattern(), mlir::detail::AttrTypeReplacerBase< Concrete >::addReplacement(), mlir::detail::AttrTypeReplacerBase< Concrete >::recursivelyReplaceElementsIn(), and mlir::LLVM::DIExpressionRewriter::simplify().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreateAlignedAllocFn | ( | OpBuilder & | b, |
Operation * | moduleOp, | ||
Type | indexType | ||
) |
Definition at line 186 of file FunctionCallUtils.cpp.
References mlir::Operation::getContext(), getVoidPtr(), kAlignedAlloc, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreateFn | ( | OpBuilder & | b, |
Operation * | moduleOp, | ||
StringRef | name, | ||
ArrayRef< Type > | paramTypes = {} , |
||
Type | resultType = {} , |
||
bool | isVarArg = false , |
||
bool | isReserved = false |
||
) |
Create a FuncOp with signature resultType
(paramTypes
)and name
name`.
Generic print function lookupOrCreate helper.
Return a failure if the FuncOp found has unexpected signature.
Definition at line 49 of file FunctionCallUtils.cpp.
References mlir::OpBuilder::create(), mlir::Region::empty(), mlir::Region::front(), mlir::get(), mlir::Operation::getLoc(), mlir::Operation::getRegion(), mlir::Operation::hasTrait(), mlir::SymbolTable::lookupSymbolIn(), and mlir::OpBuilder::setInsertionPointToStart().
Referenced by lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreateFreeFn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 194 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), getVoidPtr(), kFree, and lookupOrCreateReservedFn().
Referenced by mlir::ConvertToLLVMPattern::copyUnrankedDescriptors().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreateGenericAlignedAllocFn | ( | OpBuilder & | b, |
Operation * | moduleOp, | ||
Type | indexType | ||
) |
Definition at line 207 of file FunctionCallUtils.cpp.
References mlir::Operation::getContext(), getVoidPtr(), kGenericAlignedAlloc, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreateGenericAllocFn | ( | OpBuilder & | b, |
Operation * | moduleOp, | ||
Type | indexType | ||
) |
Definition at line 201 of file FunctionCallUtils.cpp.
References mlir::Operation::getContext(), getVoidPtr(), kGenericAlloc, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreateGenericFreeFn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 215 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), getVoidPtr(), kGenericFree, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreateMallocFn | ( | OpBuilder & | b, |
Operation * | moduleOp, | ||
Type | indexType | ||
) |
Definition at line 179 of file FunctionCallUtils.cpp.
References mlir::Operation::getContext(), getVoidPtr(), kMalloc, and lookupOrCreateReservedFn().
Referenced by mlir::ConvertToLLVMPattern::copyUnrankedDescriptors().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreateMemRefCopyFn | ( | OpBuilder & | b, |
Operation * | moduleOp, | ||
Type | indexType, | ||
Type | unrankedDescriptorType | ||
) |
Definition at line 222 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kMemRefCopy, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintBF16Fn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 111 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintBF16, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintCloseFn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 158 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintClose, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintCommaFn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 165 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintComma, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintF16Fn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 103 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintF16, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintF32Fn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 119 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintF32, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintF64Fn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 126 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintF64, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintI64Fn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Helper functions to look up or create the declaration for commonly used external C function calls.
The list of functions provided here must be implemented separately (e.g. as part of a support runtime library or as part of the libc). Failure if an unexpected version of function is found.
Definition at line 89 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintI64, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintNewlineFn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 172 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintNewline, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintOpenFn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 151 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintOpen, and lookupOrCreateReservedFn().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintStringFn | ( | OpBuilder & | b, |
Operation * | moduleOp, | ||
std::optional< StringRef > | runtimeFunctionName = {} |
||
) |
Declares a function to print a C-string.
If a custom runtime function is defined via runtimeFunctionName
, it must have the signature void(char const*). The default function is printString
.
Definition at line 141 of file FunctionCallUtils.cpp.
References mlir::get(), getCharPtr(), mlir::Operation::getContext(), kPrintString, and lookupOrCreateReservedFn().
Referenced by createPrintStrCall().
FailureOr< LLVM::LLVMFuncOp > mlir::LLVM::lookupOrCreatePrintU64Fn | ( | OpBuilder & | b, |
Operation * | moduleOp | ||
) |
Definition at line 96 of file FunctionCallUtils.cpp.
References mlir::get(), mlir::Operation::getContext(), kPrintU64, and lookupOrCreateReservedFn().
Parse any MLIR type or a concise syntax for LLVM types.
Definition at line 305 of file LLVMTypeSyntax.cpp.
Referenced by parseExtTypeParams(), and parseFunctionTypes().
void mlir::LLVM::printPrettyLLVMType | ( | AsmPrinter & | p, |
Type | type | ||
) |
Print any MLIR type or a concise syntax for LLVM types.
Definition at line 309 of file LLVMTypeSyntax.cpp.
Referenced by printFunctionTypes().
void mlir::LLVM::registerInlinerInterface | ( | DialectRegistry & | registry | ) |
Register the LLVMInlinerInterface
implementation of DialectInlinerInterface
with the LLVM dialect.
Definition at line 829 of file InlinerInterfaceImpl.cpp.
References mlir::DialectRegistry::addExtension().
Referenced by mlir::registerAllDialects().
bool mlir::LLVM::satisfiesLLVMModule | ( | Operation * | op | ) |
LLVM requires some operations to be inside of a Module operation.
This function confirms that the Operation has the desired properties.
Definition at line 4336 of file LLVMDialect.cpp.
References mlir::Operation::hasTrait().
Referenced by parentLLVMModule().
|
constexpr |
Bit-width of a 'GEPConstantIndex' within GEPArg.
Definition at line 67 of file LLVMDialect.h.
Referenced by destructureIndices(), and getSubslotAccessInfo().