[PATCH] Enable ARM tail calls for ELF

Cameron Zwarich zwarich at apple.com
Mon Jul 1 14:43:04 PDT 2013


On Jul 1, 2013, at 2:31 PM, Tim Northover <t.p.northover at gmail.com> wrote:

>>>> // This option should go away when tail calls fully work.
> 
>> That was almost assuredly Evan, might want to ask him what problems he
>> thinks there still might be? :)
> 
> Bob, actually. It looks like there was a problem with some linker back
> in the day (my guess is the MCJIT linker since it tends to be more
> ad-hoc than static linkers, but I haven't checked).
> 
> These days, I think the LLVM-only parts have probably been adequately
> tested by iOS, which leaves random home-grown linkers that may not
> cope. I think that's their problem but wanted to make sure no-one had
> one that they thought was important enough to block LLVM with.
> 
> I suppose there could be a disagreement about the functions where it's
> acceptable to change the ABI for a tail call between ELF and MachO,
> but that seems unlikely to me.

I did some of the work to qualify ARM tail calls on Darwin. The main problem we had with the toolchain is that at one point it did not support relocations for tail calls at all, and then it didn't support relocations for 16-bit calls. There were also a lot of random bugs in the target-specific ARM code that got fixed, which should hopefully apply to both Darwin and non-Darwin despite the different call pseudoinstructions.

Cameron



More information about the llvm-commits mailing list