|
MLIR
22.0.0git
|
#include "mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h"#include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h"#include "mlir/Conversion/LLVMCommon/Pattern.h"#include "mlir/Conversion/LLVMCommon/TypeConverter.h"#include "mlir/Dialect/Arith/IR/Arith.h"#include "mlir/Dialect/Async/IR/Async.h"#include "mlir/Dialect/Func/IR/FuncOps.h"#include "mlir/Dialect/Func/Transforms/FuncConversions.h"#include "mlir/Dialect/LLVMIR/FunctionCallUtils.h"#include "mlir/Dialect/LLVMIR/LLVMDialect.h"#include "mlir/IR/TypeUtilities.h"#include "mlir/Pass/Pass.h"#include "mlir/Transforms/DialectConversion.h"#include "llvm/ADT/TypeSwitch.h"#include "mlir/Conversion/Passes.h.inc"Go to the source code of this file.
Namespaces | |
| mlir | |
| Include the generated interface declarations. | |
Macros | |
| #define | GEN_PASS_DEF_CONVERTASYNCTOLLVMPASS |
| #define | DEBUG_TYPE "convert-async-to-llvm" |
Functions | |
| static void | addAsyncRuntimeApiDeclarations (ModuleOp module) |
| Adds Async Runtime C API declarations to the module. More... | |
| static void | addResumeFunction (ModuleOp module) |
A function that takes a coroutine handle and calls a llvm.coro.resume intrinsics. More... | |
Variables | |
| static constexpr const char * | kAddRef = "mlirAsyncRuntimeAddRef" |
| static constexpr const char * | kDropRef = "mlirAsyncRuntimeDropRef" |
| static constexpr const char * | kCreateToken = "mlirAsyncRuntimeCreateToken" |
| static constexpr const char * | kCreateValue = "mlirAsyncRuntimeCreateValue" |
| static constexpr const char * | kCreateGroup = "mlirAsyncRuntimeCreateGroup" |
| static constexpr const char * | kEmplaceToken = "mlirAsyncRuntimeEmplaceToken" |
| static constexpr const char * | kEmplaceValue = "mlirAsyncRuntimeEmplaceValue" |
| static constexpr const char * | kSetTokenError = "mlirAsyncRuntimeSetTokenError" |
| static constexpr const char * | kSetValueError = "mlirAsyncRuntimeSetValueError" |
| static constexpr const char * | kIsTokenError = "mlirAsyncRuntimeIsTokenError" |
| static constexpr const char * | kIsValueError = "mlirAsyncRuntimeIsValueError" |
| static constexpr const char * | kIsGroupError = "mlirAsyncRuntimeIsGroupError" |
| static constexpr const char * | kAwaitToken = "mlirAsyncRuntimeAwaitToken" |
| static constexpr const char * | kAwaitValue = "mlirAsyncRuntimeAwaitValue" |
| static constexpr const char * | kAwaitGroup = "mlirAsyncRuntimeAwaitAllInGroup" |
| static constexpr const char * | kExecute = "mlirAsyncRuntimeExecute" |
| static constexpr const char * | kGetValueStorage |
| static constexpr const char * | kAddTokenToGroup |
| static constexpr const char * | kAwaitTokenAndExecute |
| static constexpr const char * | kAwaitValueAndExecute |
| static constexpr const char * | kAwaitAllAndExecute |
| static constexpr const char * | kGetNumWorkerThreads |
| static constexpr const char * | kResume = "__resume" |
| #define DEBUG_TYPE "convert-async-to-llvm" |
Definition at line 31 of file AsyncToLLVM.cpp.
| #define GEN_PASS_DEF_CONVERTASYNCTOLLVMPASS |
Definition at line 27 of file AsyncToLLVM.cpp.
|
static |
Adds Async Runtime C API declarations to the module.
Definition at line 198 of file AsyncToLLVM.cpp.
References mlir::ImplicitLocOpBuilder::atBlockEnd(), kAddRef, kAddTokenToGroup, kAwaitAllAndExecute, kAwaitGroup, kAwaitToken, kAwaitTokenAndExecute, kAwaitValue, kAwaitValueAndExecute, kCreateGroup, kCreateToken, kCreateValue, kDropRef, kEmplaceToken, kEmplaceValue, kExecute, kGetNumWorkerThreads, kGetValueStorage, kIsGroupError, kIsTokenError, kIsValueError, kSetTokenError, and kSetValueError.
|
static |
A function that takes a coroutine handle and calls a llvm.coro.resume intrinsics.
We need this function to be able to pass it to the async runtime execute API.
Definition at line 245 of file AsyncToLLVM.cpp.
References mlir::ImplicitLocOpBuilder::atBlockEnd(), mlir::get(), and kResume.
|
staticconstexpr |
Definition at line 40 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 58 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 64 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 54 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 52 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 60 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 53 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 62 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 44 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 42 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 43 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 41 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 45 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 46 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 55 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 66 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 56 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 51 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 49 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 50 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 240 of file AsyncToLLVM.cpp.
Referenced by addResumeFunction().
|
staticconstexpr |
Definition at line 47 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().
|
staticconstexpr |
Definition at line 48 of file AsyncToLLVM.cpp.
Referenced by addAsyncRuntimeApiDeclarations().