rsmith added a comment.

In http://reviews.llvm.org/D20709#446595, @srhines wrote:

> There is a coming patch that adds a single attribute (for "kernel"), that has 
> error checking to ensure that it is only used by our RenderScript targets. I 
> assume that the cleanest way to retain that diagnostic (and get the last of 
> these divergent patches in) will be to still key off of a LangOpt. If you 
> think it is preferable to check against a target instead, I can change the 
> code to do that, but I figured this is more consistent with how other 
> attributes work.


We discussed this again today, and our preferred way forward is:

1. We have new targets for 32-bit and 64-bit renderscript as described here. 
The new targets are exactly the same as the relevant ARM targets except that 
they force the size and alignment of long to 8. (We may want to consider also 
making these targets imply -emit-llvm, especially if our notional model for the 
target is that its "machine code" is LLVM IR with an ARM triple.)

2. We have a new LangOption and InputKind for renderscript, which can be 
specified via -x renderscript and is implied by a .rs file extension. This 
LangOption controls the existence of the "kernel" attribute, and some 
renderscript-specific implicit conversion rules.

... and we treat (1) and (2) as orthogonal concerns (much like the SPIR target 
and OpenCL language); you can compile plain C or C++ to the renderscript target 
if you want, or request the renderscript language rules while targeting x86, 
even though these are not likely to be particularly useful configurations in 
practice.


http://reviews.llvm.org/D20709



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to