[all-commits] [llvm/llvm-project] 9d9c25: [C++20] [Coroutines] Don't mark await_suspend as n...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Sun Aug 27 20:45:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d9c25f81456aace2bec4b58498a420e650007d9
      https://github.com/llvm/llvm-project/commit/9d9c25f81456aace2bec4b58498a420e650007d9
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M clang/test/CodeGenCoroutines/coro-awaiter-noinline-suspend.cpp

  Log Message:
  -----------
  [C++20] [Coroutines] Don't mark await_suspend as noinline if it is specified as always_inline already

Address https://github.com/llvm/llvm-project/issues/64933 and partially
https://github.com/llvm/llvm-project/issues/64945.

After c467245, we will add a noinline attribute to the await_suspend
member function of an awaiter if the awaiter has any non static member
functions.

Obviously, this decision will bring some performance regressions. And
people may complain about this while the long term solution may not be
available soon. In such cases, it is better to provide a solution for
the users who met the regression surprisingly.

Also it is natural to not prevent the inlining if the function is marked
as always_inline by the users already.




More information about the All-commits mailing list