-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
Description
https://godbolt.org/z/5hTE69j1b
starting row 82 in asm there are something strange in 'trunk', im 99% sure someone apply 'cold' attribute or 'never inline' to all functions in final suspend or smth like.
All calls must be inlined, its literaly one-row functions.
g1() [clone .resume]: # @g1() [clone .resume]
push rbx
sub rsp, 16
cmp byte ptr [rdi + 44], 0
je .LBB8_1
lea rbx, [rdi + 16]
mov qword ptr [rdi], 0
call std::__n4861::coroutine_handle<dd::generator_promise<int> >::from_address(void*)
mov qword ptr [rsp + 8], rax
lea rdi, [rsp + 8]
call std::__n4861::coroutine_handle<dd::generator_promise<int> >::operator std::__n4861::coroutine_handle<void>() const
mov rdi, rbx
mov rsi, rax
call dd::generator_promise<int>::await_suspend(std::__n4861::coroutine_handle<void>) const
mov qword ptr [rsp], rax
mov rdi, rsp
call std::__n4861::coroutine_handle<void>::address() const
mov rdi, rax
add rsp, 16
pop rbx
jmp qword ptr [rax] # TAILCALL
.LBB8_1:
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
llvmbot commentedon Aug 23, 2023
@llvm/issue-subscribers-coroutines
@llvm.coro.await_suspend
actually #64945ChuanqiXu9 commentedon Aug 24, 2023
Sorry this is a known regression after c467245. And the proposed solution may solve the issue: #64945. Then let's track the issue there.
[NFC] [C++20] [Coroutines] Mention the side effect of a fix may bring…
[NFC] [C++20] [Coroutines] Mention the side effect of a fix may bring…
[NFC] [C++20] [Coroutines] Mention the side effect of a fix may bring…
[C++20] [Coroutines] Don't mark await_suspend as noinline if it is sp…