MLIR 22.0.0git
AsyncToLLVM.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::impl::ConvertAsyncToLLVMPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::impl
 Attribute collections provide a dictionary-like interface.

Macros

#define GEN_PASS_DEF_CONVERTASYNCTOLLVMPASS
#define DEBUG_TYPE   "convert-async-to-llvm"

Functions

std::unique_ptr<::mlir::Passmlir::impl::createConvertAsyncToLLVMPass ()
std::unique_ptr<::mlir::Passmlir::createConvertAsyncToLLVMPass ()
static void addAsyncRuntimeApiDeclarations (ModuleOp module)
 Adds Async Runtime C API declarations to the module.
static void addResumeFunction (ModuleOp module)
 A function that takes a coroutine handle and calls a llvm.coro.resume intrinsics.

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"

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "convert-async-to-llvm"

Definition at line 31 of file AsyncToLLVM.cpp.

◆ GEN_PASS_DEF_CONVERTASYNCTOLLVMPASS

#define GEN_PASS_DEF_CONVERTASYNCTOLLVMPASS

Definition at line 27 of file AsyncToLLVM.cpp.

Function Documentation

◆ addAsyncRuntimeApiDeclarations()

◆ addResumeFunction()

void addResumeFunction ( ModuleOp module)
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(), kResume, and ValueRange.

Variable Documentation

◆ kAddRef

const char* kAddRef = "mlirAsyncRuntimeAddRef"
staticconstexpr

Definition at line 40 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kAddTokenToGroup

const char* kAddTokenToGroup
staticconstexpr
Initial value:
=
"mlirAsyncRuntimeAddTokenToGroup"

Definition at line 58 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kAwaitAllAndExecute

const char* kAwaitAllAndExecute
staticconstexpr
Initial value:
=
"mlirAsyncRuntimeAwaitAllInGroupAndExecute"

Definition at line 64 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kAwaitGroup

const char* kAwaitGroup = "mlirAsyncRuntimeAwaitAllInGroup"
staticconstexpr

Definition at line 54 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kAwaitToken

const char* kAwaitToken = "mlirAsyncRuntimeAwaitToken"
staticconstexpr

Definition at line 52 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kAwaitTokenAndExecute

const char* kAwaitTokenAndExecute
staticconstexpr
Initial value:
=
"mlirAsyncRuntimeAwaitTokenAndExecute"

Definition at line 60 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kAwaitValue

const char* kAwaitValue = "mlirAsyncRuntimeAwaitValue"
staticconstexpr

Definition at line 53 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kAwaitValueAndExecute

const char* kAwaitValueAndExecute
staticconstexpr
Initial value:
=
"mlirAsyncRuntimeAwaitValueAndExecute"

Definition at line 62 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kCreateGroup

const char* kCreateGroup = "mlirAsyncRuntimeCreateGroup"
staticconstexpr

Definition at line 44 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kCreateToken

const char* kCreateToken = "mlirAsyncRuntimeCreateToken"
staticconstexpr

Definition at line 42 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kCreateValue

const char* kCreateValue = "mlirAsyncRuntimeCreateValue"
staticconstexpr

Definition at line 43 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kDropRef

const char* kDropRef = "mlirAsyncRuntimeDropRef"
staticconstexpr

Definition at line 41 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kEmplaceToken

const char* kEmplaceToken = "mlirAsyncRuntimeEmplaceToken"
staticconstexpr

Definition at line 45 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kEmplaceValue

const char* kEmplaceValue = "mlirAsyncRuntimeEmplaceValue"
staticconstexpr

Definition at line 46 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kExecute

const char* kExecute = "mlirAsyncRuntimeExecute"
staticconstexpr

Definition at line 55 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kGetNumWorkerThreads

const char* kGetNumWorkerThreads
staticconstexpr
Initial value:
=
"mlirAsyncRuntimGetNumWorkerThreads"

Definition at line 66 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kGetValueStorage

const char* kGetValueStorage
staticconstexpr
Initial value:
=
"mlirAsyncRuntimeGetValueStorage"

Definition at line 56 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kIsGroupError

const char* kIsGroupError = "mlirAsyncRuntimeIsGroupError"
staticconstexpr

Definition at line 51 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kIsTokenError

const char* kIsTokenError = "mlirAsyncRuntimeIsTokenError"
staticconstexpr

Definition at line 49 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kIsValueError

const char* kIsValueError = "mlirAsyncRuntimeIsValueError"
staticconstexpr

Definition at line 50 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kResume

const char* kResume = "__resume"
staticconstexpr

Definition at line 240 of file AsyncToLLVM.cpp.

Referenced by addResumeFunction().

◆ kSetTokenError

const char* kSetTokenError = "mlirAsyncRuntimeSetTokenError"
staticconstexpr

Definition at line 47 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().

◆ kSetValueError

const char* kSetValueError = "mlirAsyncRuntimeSetValueError"
staticconstexpr

Definition at line 48 of file AsyncToLLVM.cpp.

Referenced by addAsyncRuntimeApiDeclarations().