[PATCH] D20709: Support ARM subtarget feature +long64

Stephen Hines via cfe-commits cfe-commits at lists.llvm.org
Mon May 30 19:07:56 PDT 2016


srhines added a comment.

In http://reviews.llvm.org/D20709#443536, @kristof.beyls wrote:

> Hi Pirama,
>
> My understanding is that this introduces (yet another) ARM 32 bit ABI variant - in this case with longs being 64 bit.
>  My understanding is also that this is the ABI that is used in Renderscript, and this patch helps to remove local patches that currently live in the Renderscript toolchain downstream only.


Correct. This is only used by RenderScript, and unfortunately can't be done any differently. We had hoped to just predicate this with our own LangOpt (the patch that adds the RenderScript LangOpt is coming soon), but unfortunately, at the point where LangOpts are being parsed, the target machine already has the size and alignment of long specified (and it can't change).

> I think it's good not to need downstream patches for a Renderscript toolchain.


Same here, although these patches seem so small that I don't want to introduce too much trouble in upstream. If there isn't a nice way to clean this up, I would be fine with this amount of divergence, since it really doesn't impact our ability to update LLVM (and again, the feature is only used by RenderScript).

> In effect, this introduces another abi variant.

>  I'm wondering if the abi variant should be controlled using a triple, just like e.g. the hard float vs. soft float abi variants also get controlled via a triple?


We can't unfortunately control this via a separate triple because RenderScript has (and always) will use the ARM triple. This really only affects the frontend for RenderScript, since RS doesn't allow the full libc runtime. That is why the LLVM side of this patch has no tests (because there is nothing there, and we only need the option recognized or the backend generates warnings about an unsupported flag - perhaps there is a better way to suppress that, but at the time that I fixed this years ago, I think my only option was to add it in both places).

> Tim, do you happen to have insights on this?

> 

> Thanks,

> 

> Kristof





http://reviews.llvm.org/D20709





More information about the cfe-commits mailing list