[PATCH] D25030: [XRay] Support for for tail calls for ARM no-Thumb

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 23:13:39 PDT 2016


dberris added a comment.

In https://reviews.llvm.org/D25030#562462, @rSerge wrote:

> As I understood, x86_64 implementation for the tail calls reuses the trampoline of function exit tracing, but normal function exit tracing jumps into the trampoline, while tail call tracing calls the exit trampoline as a function. Because on ARM normal function exit tracing already calls the exit trampoline as a function, there was no need for additional switching between jump and call instruction in the patch. Thus for ARM, to reproduce the same functionality as for x86_64, it was sufficient to check whether the instruction is a tail call.


This doesn't identify whether an exit is a tail call exit though (from the instrumentation map perspective), which will cause the runtime to treat it like a normal exit. This is the current state as a transitional point to when we change the entry type being passed onto the logging function, to differentiate between normal exits and tail exits. The point of the change in X86 is to make this transition staged, instead of abrupt -- lay down the sleds, differentiate them in the instrumentation map, and then later on handle the tail calls differently.


https://reviews.llvm.org/D25030





More information about the llvm-commits mailing list