14#ifndef MLIR_DIALECT_LLVMIR_FUNCTIONCALLUTILS_H_
15#define MLIR_DIALECT_LLVMIR_FUNCTIONCALLUTILS_H_
37FailureOr<LLVM::LLVMFuncOp>
39 SymbolTableCollection *symbolTables =
nullptr);
40FailureOr<LLVM::LLVMFuncOp>
42 SymbolTableCollection *symbolTables =
nullptr);
43FailureOr<LLVM::LLVMFuncOp>
45 SymbolTableCollection *symbolTables =
nullptr);
46FailureOr<LLVM::LLVMFuncOp>
48 SymbolTableCollection *symbolTables =
nullptr);
49FailureOr<LLVM::LLVMFuncOp>
51 SymbolTableCollection *symbolTables =
nullptr);
52FailureOr<LLVM::LLVMFuncOp>
54 SymbolTableCollection *symbolTables =
nullptr);
55FailureOr<LLVM::LLVMFuncOp>
57 SymbolTableCollection *symbolTables =
nullptr);
62FailureOr<LLVM::LLVMFuncOp>
64 std::optional<StringRef> runtimeFunctionName = {},
65 SymbolTableCollection *symbolTables =
nullptr);
66FailureOr<LLVM::LLVMFuncOp>
68 SymbolTableCollection *symbolTables =
nullptr);
69FailureOr<LLVM::LLVMFuncOp>
71 SymbolTableCollection *symbolTables =
nullptr);
72FailureOr<LLVM::LLVMFuncOp>
74 SymbolTableCollection *symbolTables =
nullptr);
75FailureOr<LLVM::LLVMFuncOp>
77 SymbolTableCollection *symbolTables =
nullptr);
78FailureOr<LLVM::LLVMFuncOp>
80 SymbolTableCollection *symbolTables =
nullptr);
81FailureOr<LLVM::LLVMFuncOp>
83 SymbolTableCollection *symbolTables =
nullptr);
84FailureOr<LLVM::LLVMFuncOp>
86 SymbolTableCollection *symbolTables =
nullptr);
87FailureOr<LLVM::LLVMFuncOp>
89 SymbolTableCollection *symbolTables =
nullptr);
91 OpBuilder &
b, Operation *moduleOp, Type indexType,
92 SymbolTableCollection *symbolTables =
nullptr);
93FailureOr<LLVM::LLVMFuncOp>
95 SymbolTableCollection *symbolTables =
nullptr);
96FailureOr<LLVM::LLVMFuncOp>
98 Type unrankedDescriptorType,
99 SymbolTableCollection *symbolTables =
nullptr);
103FailureOr<LLVM::LLVMFuncOp>
105 ArrayRef<Type> paramTypes = {}, Type resultType = {},
106 bool isVarArg =
false,
bool isReserved =
false,
107 SymbolTableCollection *symbolTables =
nullptr);
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
This class helps build Operations.
Operation is the basic unit of execution within MLIR.
This class represents a collection of SymbolTables.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
This class provides an abstraction over the different types of ranges over Values.
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateFreeFn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintBF16Fn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintOpenFn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateMemRefCopyFn(OpBuilder &b, Operation *moduleOp, Type indexType, Type unrankedDescriptorType, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintCommaFn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintI64Fn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
Helper functions to look up or create the declaration for commonly used external C function calls.
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintNewlineFn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintCloseFn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintU64Fn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateGenericAlignedAllocFn(OpBuilder &b, Operation *moduleOp, Type indexType, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintF32Fn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateMallocFn(OpBuilder &b, Operation *moduleOp, Type indexType, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateGenericAllocFn(OpBuilder &b, Operation *moduleOp, Type indexType, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateAlignedAllocFn(OpBuilder &b, Operation *moduleOp, Type indexType, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintStringFn(OpBuilder &b, Operation *moduleOp, std::optional< StringRef > runtimeFunctionName={}, SymbolTableCollection *symbolTables=nullptr)
Declares a function to print a C-string.
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateApFloatPrintFn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintF16Fn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateGenericFreeFn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreatePrintF64Fn(OpBuilder &b, Operation *moduleOp, SymbolTableCollection *symbolTables=nullptr)
FailureOr< LLVM::LLVMFuncOp > lookupOrCreateFn(OpBuilder &b, Operation *moduleOp, StringRef name, ArrayRef< Type > paramTypes={}, Type resultType={}, bool isVarArg=false, bool isReserved=false, SymbolTableCollection *symbolTables=nullptr)
Create a FuncOp with signature resultType(paramTypes) and name name`.
Include the generated interface declarations.