diff options
Diffstat (limited to 'llvm/docs/Coroutines.rst')
| -rw-r--r-- | llvm/docs/Coroutines.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/docs/Coroutines.rst b/llvm/docs/Coroutines.rst index 13d2da4..0e6b49c 100644 --- a/llvm/docs/Coroutines.rst +++ b/llvm/docs/Coroutines.rst @@ -193,7 +193,7 @@ Values live across a suspend point need to be stored in the coroutine frame to be available in the continuation function. This frame is stored as a tail to the `async context`. -Every suspend point takes an `context projection function` argument which +Every suspend point takes a `context projection function` argument which describes how-to obtain the continuations `async context` and every suspend point has an associated `resume function` denoted by the `llvm.coro.async.resume` intrinsic. The coroutine is resumed by calling this @@ -221,7 +221,7 @@ a parameter to the `llvm.coro.suspend.async` intrinsic. ptr %resume_func_ptr, ptr %context_projection_function -The frontend should provide a `async function pointer` struct associated with +The frontend should provide an `async function pointer` struct associated with each async coroutine by `llvm.coro.id.async`'s argument. The initial size and alignment of the `async context` must be provided as arguments to the `llvm.coro.id.async` intrinsic. Lowering will update the size entry with the @@ -314,7 +314,7 @@ coroutine handle. The second parameter of `coro.begin` is given a block of memor to be used if the coroutine frame needs to be allocated dynamically. The `coro.id`_ intrinsic serves as coroutine identity useful in cases when the -`coro.begin`_ intrinsic get duplicated by optimization passes such as +`coro.begin`_ intrinsic gets duplicated by optimization passes such as jump-threading. The `cleanup` block destroys the coroutine frame. The `coro.free`_ intrinsic, @@ -2149,7 +2149,7 @@ CoroEarly The CoroEarly pass ensures later middle end passes correctly interpret coroutine semantics and lowers coroutine intrinsics that not needed to be preserved to help later coroutine passes. This pass lowers `coro.promise`_, `coro.frame`_ and -`coro.done`_ intrinsics. Afterwards, it replace uses of promise alloca with +`coro.done`_ intrinsics. Afterwards, it replaces uses of promise alloca with `coro.promise`_ intrinsic. .. _CoroSplit: @@ -2188,7 +2188,7 @@ Attributes coro_only_destroy_when_complete ------------------------------- -When the coroutine are marked with coro_only_destroy_when_complete, it indicates +When the coroutine is marked with coro_only_destroy_when_complete, it indicates the coroutine must reach the final suspend point when it get destroyed. This attribute only works for switched-resume coroutines now. @@ -2199,7 +2199,7 @@ coro_elide_safe When a Call or Invoke instruction to switch ABI coroutine `f` is marked with `coro_elide_safe`, CoroSplitPass generates a `f.noalloc` ramp function. `f.noalloc` has one more argument than its original ramp function `f`, which is -the pointer to the allocated frame. `f.noalloc` also suppressed any allocations +the pointer to the allocated frame. `f.noalloc` also suppresses any allocations or deallocations that may be guarded by `@llvm.coro.alloc` and `@llvm.coro.free`. CoroAnnotationElidePass performs the heap elision when possible. Note that for |
