[PATCH] D27231: [PowerPC] Fix logic dealing with nop after calls (and tail-call eligibility)
Kyle Butt via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 20 18:36:24 PST 2016
iteratee added a comment.
I should clarify the problem.
LLVM / Clang may not support ELF interposition. But the linker just doesn't care. If we emit a symbol that is ExternallyAvailable and not local linkage, the linker will emit a trampoline that saves r2, even for a tail call.
This is a problem for a tail call as before the jump, it removes its own stack frame (or it lived in the red zone in the case I debugged), so the r2 being saved by the trampoline is not correct.
a -- calls -> b -- tail calls -> c
if a is in a different module from b, then a's saved copy of r2 will be clobbered by the b->c trampoline that the linker generates.
Repository:
rL LLVM
https://reviews.llvm.org/D27231
More information about the llvm-commits
mailing list