Re: [PATCH] c++: coroutines - Overlap variables in frame [PR105989]

2023-05-14 Thread Michal Jankovič via Gcc-patches
s), for example, if I have a >>> composed operation: >>> >>> co_await when_either(get_leaf_awaitable_1(), get_leaf_awaitable_2()); >>> >>> Right now, this creates space in the frame for the temporary 'leaf' >>> >>> awaitabl

Re: [PATCH] c++: coroutines - Overlap variables in frame [PR105989]

2023-05-14 Thread Michal Jankovič via Gcc-patches
stomization point was used. > > What are your thoughts on the feasibility / difficulty of implementing > such an optimization? > > Michal > >>> >>> Do you have any advice / opinions on this before I try to implement it? >> >> Hopefully, the

Re: [PATCH] c++: coroutines - Overlap variables in frame [PR105989]

2022-07-12 Thread Michal Jankovič via Gcc-patches
blem. The _Coro_self_handle should be constructible on-demand from the frame address. Do you have any advice / opinions on this before I try to implement it? Michal On Jul 12 2022, at 4:08 pm, Iain Sandoe wrote: > Hi Michal, > >> On 12 Jul 2022, at 14:35, Michal Jankovič via

[PATCH] c++: coroutines - Overlap variables in frame [PR105989]

2022-07-12 Thread Michal Jankovič via Gcc-patches
Currently, coroutine frames store all variables of a coroutine separately, even if their lifetime does not overlap (they are in distinct scopes). This patch implements overlapping distinct variable scopes in the coroutine frame, by storing the frame fields in nested unions of structs. This lowers t