[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 16 21:44:45 PDT 2024
ChuanqiXu9 wrote:
> Thanks for the feedback. This patch is the first iteration to model this idea as quickly as I can. In general, I agree with your comments.
>
> > * I feel the name containing `concurrency` is not proper
>
> The name is bikesheddable as always. I was also thinking around the line of `[[clang::coro_inplace_awaitable_task]]`.
>
> > * Every time we add or change IR related to coroutines, we need to update https://llvm.org/docs/Coroutines.html. So that we can understand the semantics of the proposed `llvm.coro.safe.elide` much easier.
>
> Will do once we agree on a design.
>
> > * I'd like to add a new effect to the attribute to always inline (or an inline hint) every such callee function. Note that this won't be part of semantics but the implementation details.
>
> This is a good suggestion for the scope of another PR.
>
> > * What I prefer is to add a middle end function attribute (must-coro-elide) and apply this attribute and (always inline attribute) to the calls
>
> Do you mean the caller or the callee? I think both, right?
To calls. We can add attribute to calls instead of functions.
https://github.com/llvm/llvm-project/pull/94693
More information about the cfe-commits
mailing list