|
MLIR 22.0.0git
|
#include <utility>#include "mlir/Dialect/Async/Passes.h"#include "PassDetail.h"#include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"#include "mlir/Dialect/Arith/IR/Arith.h"#include "mlir/Dialect/Async/IR/Async.h"#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"#include "mlir/Dialect/Func/IR/FuncOps.h"#include "mlir/Dialect/SCF/IR/SCF.h"#include "mlir/IR/IRMapping.h"#include "mlir/IR/PatternMatch.h"#include "mlir/Transforms/DialectConversion.h"#include "mlir/Transforms/RegionUtils.h"#include "llvm/Support/Debug.h"#include <optional>#include "mlir/Dialect/Async/Passes.h.inc"Go to the source code of this file.
Classes | |
| class | mlir::impl::AsyncFuncToAsyncRuntimePassBase< DerivedT > |
| class | mlir::impl::AsyncToAsyncRuntimePassBase< DerivedT > |
| class | YieldOpLowering |
| class | AssertOpLowering |
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
| namespace | mlir::impl |
| Attribute collections provide a dictionary-like interface. | |
Macros | |
| #define | GEN_PASS_DEF_ASYNCTOASYNCRUNTIMEPASS |
| #define | GEN_PASS_DEF_ASYNCFUNCTOASYNCRUNTIMEPASS |
| #define | DEBUG_TYPE "async-to-async-runtime" |
Typedefs | |
| using | FuncCoroMapPtr |
Functions | |
| std::unique_ptr<::mlir::Pass > | mlir::impl::createAsyncFuncToAsyncRuntimePass () |
| std::unique_ptr<::mlir::Pass > | mlir::createAsyncFuncToAsyncRuntimePass () |
| std::unique_ptr<::mlir::Pass > | mlir::impl::createAsyncToAsyncRuntimePass () |
| std::unique_ptr<::mlir::Pass > | mlir::createAsyncToAsyncRuntimePass () |
| static CoroMachinery | setupCoroMachinery (func::FuncOp func) |
| Utility to partially update the regular function CFG to the coroutine CFG compatible with LLVM coroutines switched-resume lowering using async.runtime.
| |
| static Block * | setupSetErrorBlock (CoroMachinery &coro) |
| static std::pair< func::FuncOp, CoroMachinery > | outlineExecuteOp (SymbolTable &symbolTable, ExecuteOp execute) |
| Outline the body region attached to the async.execute op into a standalone function. | |
Variables | |
| static constexpr const char | kAsyncFnPrefix [] = "async_execute_fn" |
| #define DEBUG_TYPE "async-to-async-runtime" |
Definition at line 41 of file AsyncToAsyncRuntime.cpp.
| #define GEN_PASS_DEF_ASYNCFUNCTOASYNCRUNTIMEPASS |
Definition at line 34 of file AsyncToAsyncRuntime.cpp.
| #define GEN_PASS_DEF_ASYNCTOASYNCRUNTIMEPASS |
Definition at line 33 of file AsyncToAsyncRuntime.cpp.
| using FuncCoroMapPtr |
Definition at line 123 of file AsyncToAsyncRuntime.cpp.
|
static |
Outline the body region attached to the async.execute op into a standalone function.
Note that this is not reversible transformation.
Definition at line 295 of file AsyncToAsyncRuntime.cpp.
References mlir::ImplicitLocOpBuilder::atBlockBegin(), mlir::async::cloneConstantsIntoTheRegion(), mlir::Block::getTerminator(), mlir::Value::getType(), mlir::getUsedValuesDefinedAbove(), mlir::SymbolTable::insert(), kAsyncFnPrefix, mlir::IRMapping::map(), mlir::SymbolTable::Private, mlir::SymbolTable::setSymbolVisibility(), and setupCoroMachinery().
|
static |
Utility to partially update the regular function CFG to the coroutine CFG compatible with LLVM coroutines switched-resume lowering using async.runtime.
* and async.coro.* operations. Adds a new entry block that branches into preexisting entry block. Also inserts trailing blocks.
The result types of the passed func start with an optional async.token and be continued with some number of async.values.
See LLVM coroutines documentation: https://llvm.org/docs/Coroutines.html
^cleanup: async.coro.free hdl // delete the coroutine state cf.br ^suspend
^suspend: async.coro.end hdl // marks the end of a coroutine return token, value : !async.token, !async.value<T> }
Definition at line 170 of file AsyncToAsyncRuntime.cpp.
References mlir::ImplicitLocOpBuilder::atBlockBegin(), mlir::Block::getOperations(), and mlir::Block::splitBlock().
Referenced by outlineExecuteOp().
|
static |
Definition at line 263 of file AsyncToAsyncRuntime.cpp.
References mlir::ImplicitLocOpBuilder::atBlockBegin().
Referenced by AssertOpLowering::matchAndRewrite().
|
staticconstexpr |
Definition at line 43 of file AsyncToAsyncRuntime.cpp.
Referenced by outlineExecuteOp().