[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.
Josh Haberman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 8 09:47:54 PDT 2021
haberman added a comment.
In D99517#2667025 <https://reviews.llvm.org/D99517#2667025>, @rjmccall wrote:
> You should structure this code so it's easy to add exceptions for certain calling conventions that can support tail calls with weaker restrictions (principally, callee-pop conventions). Mostly that probably means checking the calling convention first, or extracting the type restriction checks into a different function that you can skip. For example, I believe x86's `fastcall` convention can logically support any combination of prototypes as `musttail` as long as the return types are vaguely compatible.
I moved the calling convention check to be as early as possible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99517/new/
https://reviews.llvm.org/D99517
More information about the cfe-commits
mailing list