MLIR  20.0.0git
Functions | Variables
FunctionCallUtils.cpp File Reference
#include "mlir/Dialect/LLVMIR/FunctionCallUtils.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/Support/LLVM.h"

Go to the source code of this file.

Functions

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. More...
 
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 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()

static LLVM::LLVMPointerType getCharPtr ( MLIRContext context)
static

Definition at line 100 of file FunctionCallUtils.cpp.

References mlir::get().

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

◆ getVoidPtr()

static LLVM::LLVMPointerType getVoidPtr ( MLIRContext context)
static

Variable Documentation

◆ kAlignedAlloc

constexpr llvm::StringRef kAlignedAlloc = "aligned_alloc"
staticconstexpr

Definition at line 39 of file FunctionCallUtils.cpp.

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

◆ kFree

constexpr llvm::StringRef kFree = "free"
staticconstexpr

Definition at line 40 of file FunctionCallUtils.cpp.

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

◆ kGenericAlignedAlloc

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

Definition at line 42 of file FunctionCallUtils.cpp.

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

◆ kGenericAlloc

constexpr llvm::StringRef kGenericAlloc = "_mlir_memref_to_llvm_alloc"
staticconstexpr

Definition at line 41 of file FunctionCallUtils.cpp.

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

◆ kGenericFree

constexpr llvm::StringRef kGenericFree = "_mlir_memref_to_llvm_free"
staticconstexpr

Definition at line 44 of file FunctionCallUtils.cpp.

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

◆ kMalloc

constexpr llvm::StringRef kMalloc = "malloc"
staticconstexpr

Definition at line 38 of file FunctionCallUtils.cpp.

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

◆ kMemRefCopy

constexpr llvm::StringRef kMemRefCopy = "memrefCopy"
staticconstexpr

Definition at line 45 of file FunctionCallUtils.cpp.

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

◆ kPrintBF16

constexpr llvm::StringRef kPrintBF16 = "printBF16"
staticconstexpr

Definition at line 30 of file FunctionCallUtils.cpp.

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

◆ kPrintClose

constexpr llvm::StringRef kPrintClose = "printClose"
staticconstexpr

Definition at line 35 of file FunctionCallUtils.cpp.

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

◆ kPrintComma

constexpr llvm::StringRef kPrintComma = "printComma"
staticconstexpr

Definition at line 36 of file FunctionCallUtils.cpp.

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

◆ kPrintF16

constexpr llvm::StringRef kPrintF16 = "printF16"
staticconstexpr

Definition at line 29 of file FunctionCallUtils.cpp.

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

◆ kPrintF32

constexpr llvm::StringRef kPrintF32 = "printF32"
staticconstexpr

Definition at line 31 of file FunctionCallUtils.cpp.

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

◆ kPrintF64

constexpr llvm::StringRef kPrintF64 = "printF64"
staticconstexpr

Definition at line 32 of file FunctionCallUtils.cpp.

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

◆ kPrintI64

constexpr 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

constexpr llvm::StringRef kPrintNewline = "printNewline"
staticconstexpr

Definition at line 37 of file FunctionCallUtils.cpp.

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

◆ kPrintOpen

constexpr llvm::StringRef kPrintOpen = "printOpen"
staticconstexpr

Definition at line 34 of file FunctionCallUtils.cpp.

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

◆ kPrintString

constexpr llvm::StringRef kPrintString = "printString"
staticconstexpr

Definition at line 33 of file FunctionCallUtils.cpp.

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

◆ kPrintU64

constexpr llvm::StringRef kPrintU64 = "printU64"
staticconstexpr

Definition at line 28 of file FunctionCallUtils.cpp.

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