Issue |
135377
|
Summary |
[clang] await_suspend() -> std::noop_coroutine() = missed optimization
|
Labels |
clang
|
Assignees |
|
Reporter |
tzcnt
|
When returning `std::noop_coroutine()` from `await_suspend`, this always seems to result in:
```
lea std::__n4861::coroutine_handle<std::__n4861::noop_coroutine_promise,%rcx
jmp *(%rcx)
```
This delegates to a function that is simply `ret` (<std::__n4861::coroutine_handle<std::__n4861::noop_coroutine_promise>::__frame::__dummy_resume_destroy()>)
This seems like a missed optimization. Can we simply inline the `ret` and skip the indirect jump?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs