MLIR 22.0.0git
FunctionCallUtils.cpp File Reference

Go to the source code of this file.

Functions

static FailureOr< LLVM::LLVMFuncOp > lookupOrCreateReservedFn (OpBuilder &b, Operation *moduleOp, StringRef name, ArrayRef< Type > paramTypes, Type resultType, SymbolTableCollection *symbolTables)
static LLVM::LLVMPointerType getCharPtr (MLIRContext *context)
static LLVM::LLVMPointerType getVoidPtr (MLIRContext *context)

Variables

static constexpr llvm::StringRef kPrintI64 = "printI64"
 Helper functions to lookup or create the declaration for commonly used external C function calls.
static constexpr llvm::StringRef kPrintU64 = "printU64"
static constexpr llvm::StringRef kPrintF16 = "printF16"
static constexpr llvm::StringRef kPrintBF16 = "printBF16"
static constexpr llvm::StringRef kPrintF32 = "printF32"
static constexpr llvm::StringRef kPrintF64 = "printF64"
static constexpr llvm::StringRef kPrintApFloat = "printApFloat"
static constexpr llvm::StringRef kPrintString = "printString"
static constexpr llvm::StringRef kPrintOpen = "printOpen"
static constexpr llvm::StringRef kPrintClose = "printClose"
static constexpr llvm::StringRef kPrintComma = "printComma"
static constexpr llvm::StringRef kPrintNewline = "printNewline"
static constexpr llvm::StringRef kMalloc = "malloc"
static constexpr llvm::StringRef kAlignedAlloc = "aligned_alloc"
static constexpr llvm::StringRef kFree = "free"
static constexpr llvm::StringRef kGenericAlloc = "_mlir_memref_to_llvm_alloc"
static constexpr llvm::StringRef kGenericAlignedAlloc
static constexpr llvm::StringRef kGenericFree = "_mlir_memref_to_llvm_free"
static constexpr llvm::StringRef kMemRefCopy = "memrefCopy"

Function Documentation

◆ getCharPtr()

LLVM::LLVMPointerType getCharPtr ( MLIRContext * context)
static

Definition at line 174 of file FunctionCallUtils.cpp.

Referenced by getVoidPtr(), and mlir::LLVM::lookupOrCreatePrintStringFn().

◆ getVoidPtr()

◆ lookupOrCreateReservedFn()

Variable Documentation

◆ kAlignedAlloc

llvm::StringRef kAlignedAlloc = "aligned_alloc"
staticconstexpr

Definition at line 40 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreateAlignedAllocFn().

◆ kFree

llvm::StringRef kFree = "free"
staticconstexpr

Definition at line 41 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreateFreeFn().

◆ kGenericAlignedAlloc

llvm::StringRef kGenericAlignedAlloc
staticconstexpr
Initial value:
=
"_mlir_memref_to_llvm_aligned_alloc"

Definition at line 43 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreateGenericAlignedAllocFn().

◆ kGenericAlloc

llvm::StringRef kGenericAlloc = "_mlir_memref_to_llvm_alloc"
staticconstexpr

Definition at line 42 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreateGenericAllocFn().

◆ kGenericFree

llvm::StringRef kGenericFree = "_mlir_memref_to_llvm_free"
staticconstexpr

Definition at line 45 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreateGenericFreeFn().

◆ kMalloc

llvm::StringRef kMalloc = "malloc"
staticconstexpr

Definition at line 39 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreateMallocFn().

◆ kMemRefCopy

llvm::StringRef kMemRefCopy = "memrefCopy"
staticconstexpr

Definition at line 46 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreateMemRefCopyFn().

◆ kPrintApFloat

llvm::StringRef kPrintApFloat = "printApFloat"
staticconstexpr

Definition at line 33 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreateApFloatPrintFn().

◆ kPrintBF16

llvm::StringRef kPrintBF16 = "printBF16"
staticconstexpr

Definition at line 30 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintBF16Fn().

◆ kPrintClose

llvm::StringRef kPrintClose = "printClose"
staticconstexpr

Definition at line 36 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintCloseFn().

◆ kPrintComma

llvm::StringRef kPrintComma = "printComma"
staticconstexpr

Definition at line 37 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintCommaFn().

◆ kPrintF16

llvm::StringRef kPrintF16 = "printF16"
staticconstexpr

Definition at line 29 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintF16Fn().

◆ kPrintF32

llvm::StringRef kPrintF32 = "printF32"
staticconstexpr

Definition at line 31 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintF32Fn().

◆ kPrintF64

llvm::StringRef kPrintF64 = "printF64"
staticconstexpr

Definition at line 32 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintF64Fn().

◆ kPrintI64

llvm::StringRef kPrintI64 = "printI64"
staticconstexpr

Helper functions to lookup 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).

Definition at line 27 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintI64Fn().

◆ kPrintNewline

llvm::StringRef kPrintNewline = "printNewline"
staticconstexpr

Definition at line 38 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintNewlineFn().

◆ kPrintOpen

llvm::StringRef kPrintOpen = "printOpen"
staticconstexpr

Definition at line 35 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintOpenFn().

◆ kPrintString

llvm::StringRef kPrintString = "printString"
staticconstexpr

Definition at line 34 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintStringFn().

◆ kPrintU64

llvm::StringRef kPrintU64 = "printU64"
staticconstexpr

Definition at line 28 of file FunctionCallUtils.cpp.

Referenced by mlir::LLVM::lookupOrCreatePrintU64Fn().