[PATCH] D105807: [X86] pr51000 struct return tailcalling
Nathan Sidwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 09:28:04 PDT 2021
urnathan added a comment.
> Do we need a way to query the backend? eg. expose `IsEligibleForTailCallOptimization()` or similar to front-ends like Clang?
In general that's not possible until we've done code generation. (a) the middle end is responsible for determing a bunch of 'can tail-call' pieces (like local variable liveness at the point of the call). The backend is responsible for determining other items (like 'this is a cross-SO call'. Heck, code generation might not be being done in the same process as the compiler invocation -- LTO is a thing :).
I think there are two types of tail-call failure.
a) middle-end says no -- eg, a local stack-resident variable is live across the call.
b) the back-end says no -- eg, we have a cross-SO call here (and the got-pointer is callee-save).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105807/new/
https://reviews.llvm.org/D105807
More information about the llvm-commits
mailing list