[all-commits] [llvm/llvm-project] c2e399: [CoroSplit] Never cross suspending points when `co...
Weibo He via All-commits
all-commits at lists.llvm.org
Fri May 29 01:33:16 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c2e39974c8e27727b15297f82b6bd3be684a4789
https://github.com/llvm/llvm-project/commit/c2e39974c8e27727b15297f82b6bd3be684a4789
Author: Weibo He <NewSigma at 163.com>
Date: 2026-05-29 (Fri, 29 May 2026)
Changed paths:
M llvm/include/llvm/Transforms/Coroutines/SuspendCrossingInfo.h
M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
M llvm/lib/Transforms/Coroutines/SuspendCrossingInfo.cpp
A llvm/test/Transforms/Coroutines/coro-frame-inramp.ll
Log Message:
-----------
[CoroSplit] Never cross suspending points when `coro.is_in_ramp` is true (#198226)
When `coro.is_in_ramp` is true, the marked region does not appear in
resumers after splitting and therefore never crosses a suspension point.
This patch leverages that property to avoid wasting space on lazy
conversion:
``` C++
#include <coroutine>
struct coro {
struct promise_type {
auto get_return_object() noexcept {
return std::coroutine_handle<promise_type>::from_promise(*this);
}
std::suspend_always initial_suspend() noexcept { return {}; }
std::suspend_never final_suspend() noexcept { return {}; }
void return_void() noexcept {}
void unhandled_exception() {}
};
coro(std::coroutine_handle<promise_type> handle) : handle(handle) {}
std::coroutine_handle<> handle;
long l[2];
};
coro fn() {
co_return;
}
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list