Allow normal function results of @yield_once coroutines (#69843)

This adds SIL-level support and LLVM codegen for normal results of a coroutine.

The main user of this will be autodiff as VJP of a coroutine must be a coroutine itself (in order to produce the yielded result) and return a pullback closure as a normal result.

For now only direct results are supported, but this seems to be enough for autodiff purposes.
This commit is contained in:
Anton Korobeynikov
2024-02-06 22:13:15 -08:00
committed by GitHub
parent 01bce39100
commit aa5b505014
71 changed files with 571 additions and 295 deletions

View File

@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t SWIFTMODULE_VERSION_MINOR = 848; // inroduced a package SIL linkage
const uint16_t SWIFTMODULE_VERSION_MINOR = 849; // end_apply result
/// A standard hash seed used for all string hashes in a serialized module.
///