Commit 13f109c
authored
* Update coroutine intrinsics documentation and few remaining tests to opaque pointers (llvm#65698)
* Extend `retcon.once` coroutines lowering to optionally produce a normal result (llvm#66333)
One of the main user of these kind of coroutines is swift. There yield-once (`retcon.once`) coroutines are used to temporary "expose" pointers to internal fields of various objects creating borrow scopes.
However, in some cases it might be useful also to allow these coroutines to produce a normal result, but there is no convenient way to represent this (as compared to switched-resume kind of coroutines where C++ `co_return` is transformed to a member / callback call on promise object).
The extension is simple: we allow continuation function to have a non-void result and accept optional extra arguments via a special `llvm.coro.end.result` intrinsic that would essentially forward them as normal results.
1 parent 87789f0 commit 13f109c
File tree
128 files changed
+917
-495
lines changed- clang
- lib/CodeGen
- test/CodeGenCoroutines
- llvm
- docs
- include/llvm/IR
- lib
- IR
- Transforms/Coroutines
- test
- Assembler
- Transforms
- Coroutines
- FunctionAttrs
- LICM
- mlir
- include/mlir/Dialect/LLVMIR
- lib
- Conversion/AsyncToLLVM
- Target/LLVMIR
- test/Target/LLVMIR
- Import
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
128 files changed
+917
-495
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
406 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
407 | 410 | | |
408 | 411 | | |
409 | 412 | | |
| |||
754 | 757 | | |
755 | 758 | | |
756 | 759 | | |
757 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
758 | 763 | | |
759 | 764 | | |
760 | 765 | | |
| |||
823 | 828 | | |
824 | 829 | | |
825 | 830 | | |
826 | | - | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
827 | 836 | | |
828 | 837 | | |
829 | 838 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
0 commit comments