14 #ifndef MLIR_DIALECT_LLVMIR_FUNCTIONCALLUTILS_H_
15 #define MLIR_DIALECT_LLVMIR_FUNCTIONCALLUTILS_H_
27 class SymbolTableCollection;
37 FailureOr<LLVM::LLVMFuncOp>
39 SymbolTableCollection *symbolTables =
nullptr);
40 FailureOr<LLVM::LLVMFuncOp>
42 SymbolTableCollection *symbolTables =
nullptr);
43 FailureOr<LLVM::LLVMFuncOp>
45 SymbolTableCollection *symbolTables =
nullptr);
46 FailureOr<LLVM::LLVMFuncOp>
48 SymbolTableCollection *symbolTables =
nullptr);
49 FailureOr<LLVM::LLVMFuncOp>
51 SymbolTableCollection *symbolTables =
nullptr);
52 FailureOr<LLVM::LLVMFuncOp>
54 SymbolTableCollection *symbolTables =
nullptr);
58 FailureOr<LLVM::LLVMFuncOp>
60 std::optional<StringRef> runtimeFunctionName = {},
61 SymbolTableCollection *symbolTables =
nullptr);
62 FailureOr<LLVM::LLVMFuncOp>
64 SymbolTableCollection *symbolTables =
nullptr);
65 FailureOr<LLVM::LLVMFuncOp>
67 SymbolTableCollection *symbolTables =
nullptr);
68 FailureOr<LLVM::LLVMFuncOp>
70 SymbolTableCollection *symbolTables =
nullptr);
71 FailureOr<LLVM::LLVMFuncOp>
73 SymbolTableCollection *symbolTables =
nullptr);
74 FailureOr<LLVM::LLVMFuncOp>
76 SymbolTableCollection *symbolTables =
nullptr);
77 FailureOr<LLVM::LLVMFuncOp>
79 SymbolTableCollection *symbolTables =
nullptr);
80 FailureOr<LLVM::LLVMFuncOp>
82 SymbolTableCollection *symbolTables =
nullptr);
83 FailureOr<LLVM::LLVMFuncOp>
85 SymbolTableCollection *symbolTables =
nullptr);
87 OpBuilder &b, Operation *moduleOp, Type indexType,
88 SymbolTableCollection *symbolTables =
nullptr);
89 FailureOr<LLVM::LLVMFuncOp>
91 SymbolTableCollection *symbolTables =
nullptr);
92 FailureOr<LLVM::LLVMFuncOp>
94 Type unrankedDescriptorType,
95 SymbolTableCollection *symbolTables =
nullptr);
99 FailureOr<LLVM::LLVMFuncOp>
101 ArrayRef<Type> paramTypes = {},
Type resultType = {},
102 bool isVarArg =
false,
bool isReserved =
false,
103 SymbolTableCollection *symbolTables =
nullptr);
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 > 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 namename`.
@ Type
An inlay hint that for a type annotation.
Include the generated interface declarations.