[all-commits] [llvm/llvm-project] c6543c: llvm.coro.id.async lowering: Parameterize how-to r...
Arnold Schwaighofer via All-commits
all-commits at lists.llvm.org
Fri Nov 6 06:23:56 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c6543cc6b8f107b58e7205d8fc64865a508bacba
https://github.com/llvm/llvm-project/commit/c6543cc6b8f107b58e7205d8fc64865a508bacba
Author: Arnold Schwaighofer <aschwaighofer at apple.com>
Date: 2020-11-06 (Fri, 06 Nov 2020)
Changed paths:
M llvm/docs/Coroutines.rst
M llvm/include/llvm/IR/Intrinsics.td
M llvm/lib/Transforms/Coroutines/CoroElide.cpp
M llvm/lib/Transforms/Coroutines/CoroInstr.h
M llvm/lib/Transforms/Coroutines/CoroInternal.h
M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
M llvm/lib/Transforms/Coroutines/Coroutines.cpp
M llvm/test/Transforms/Coroutines/coro-async.ll
Log Message:
-----------
llvm.coro.id.async lowering: Parameterize how-to restore the current's continutation context and restart the pipeline after splitting
The `llvm.coro.suspend.async` intrinsic takes a function pointer as its
argument that describes how-to restore the current continuation's
context from the context argument of the continuation function. Before
we assumed that the current context can be restored by loading from the
context arguments first pointer field (`first_arg->caller_context`).
This allows for defining suspension points that reuse the current
context for example.
Also:
llvm.coro.id.async lowering: Add llvm.coro.preprare.async intrinsic
Blocks inlining until after the async coroutine was split.
Also, change the async function pointer's context size position
struct async_function_pointer {
uint32_t relative_function_pointer_to_async_impl;
uint32_t context_size;
}
And make the position of the `async context` argument configurable. The
position is specified by the `llvm.coro.id.async` intrinsic.
rdar://70097093
Differential Revision: https://reviews.llvm.org/D90783
More information about the All-commits
mailing list