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

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 6 10:59:57 PDT 2023


xbolva00 added a comment.

In D147714#4249274 <https://reviews.llvm.org/D147714#4249274>, @efriedma wrote:

> Any thoughts on diagnostics here?  If I'm not mistaken, with this patch, if you request an impossible tail call, you get a crash with very little useful information.  (Although, see https://discourse.llvm.org/t/rfc-improving-clangs-middle-and-back-end-diagnostics/69261 )

Yes, something like:

  fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail

It seems it would be possible to return also "reason" from IsEligibleForTailCallOptimization. On the other hand, IsEligibleForTailCallOptimization is implemented by many backends, so quite a lot of work, so for now maybe we could improve it atleast for X86 / ARM?


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

https://reviews.llvm.org/D147714



More information about the cfe-commits mailing list