[llvm] [Coroutines] Model retcon returns explicitly and upgrade legacy IR (PR #227232)
Karim Alweheshy via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 2 05:36:48 PDT 2026
karim-alweheshy wrote:
Updated in fee956205ed8:
- Migrated the retcon transform tests to the explicit seventh return-slot operand and load/return form. They no longer rely on AutoUpgrade.
- Moved legacy six-operand, stale-return-attribute, and void-return coverage into dedicated assembler upgrade tests, with a bitcode round-trip check. The legacy `coro.end` ordering regression remains separate.
- Removed the old retcon case from `FunctionAttrs/noreturn.ll` and enabled normal attribute inference for retcon functions. The direct/indirect-call regression checks inferred `nounwind` as well as preservation of the aggregate return.
- Left typed-allocator integration to #211099; this PR retains the fixed seven-operand contract.
One scope question: removing the entire `presplitcoroutine` exclusion from FunctionAttrs makes the existing `coro-async.ll` `simpleFunc` case acquire `noreturn`. Its pre-split form still ends in `coro.end.async` followed by `unreachable`, whereas splitting produces a musttail call and `ret void`. I therefore narrowed the existing exclusion to non-retcon ABIs rather than changing the async test expectation. Would you prefer keeping that remaining exclusion here and handling the async representation separately?
Validation: 231 tests passed across the coroutine/attribute directories, dedicated legacy-upgrade cases, and three ThinLTO postlink pipeline tests; 5 were unsupported by the local tool/target configuration. An LLVM-23-produced legacy bitcode reproducer also passes `thinlto<O2>` with `-verify-each` and the aggregate-result join checks. Changed C++ lines pass git-clang-format. The PR remains draft.
https://github.com/llvm/llvm-project/pull/227232
More information about the llvm-commits
mailing list