[PATCH] D147714: [Attr] Introduce [[clang::nonportable_musttail]] as less strict version of [[clang::musttail]]

Josh Haberman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 7 11:38:58 PDT 2023


haberman added a comment.

`[[nonportable_musttail]]` makes sense to me as a semantic. It indicates that the algorithm requires tail calls, but the author is willing to accept that the algorithm may be non-portable.

"Non-portable" here can mean architecture-specific, but it can also mean "sensitive to compiler flags." For example, I think there are architectures where tail calls can be optimized for statically-linked code but not across a shared library boundary.

Since the circumstances for when tail calls are supported can be complicated and subtle, architecture-specific attributes don't make as much sense to me.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147714/new/

https://reviews.llvm.org/D147714



More information about the cfe-commits mailing list