[PATCH] D105807: [X86] pr51000 struct return tailcalling
Josh Haberman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 10:38:06 PDT 2021
haberman added a comment.
> a) middle-end says no -- eg, a local stack-resident variable is live across the call.
What is an example of this? The `musttail` attribute requires that it is immediately followed by a `ret`, so I can't think of any way to trigger this case that would pass IR verification.
The Clang code for `musttail` already detects and rejects the case where a variable with a non-trivial destructor is in scope at the call site: https://github.com/llvm/llvm-project/blob/072669521456a369409cf9db30739a3fac740173/clang/test/SemaCXX/attr-musttail.cpp#L58-L62
> b) the back-end says no -- eg, we have a cross-SO call here (and the got-pointer is callee-save).
This is the case I am worried about. I don't know how we detect this in the front-end, since it's arch-dependent whether cross-SO calls will work.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105807/new/
https://reviews.llvm.org/D105807
More information about the llvm-commits
mailing list