[cfe-dev] CUDA patch series 2 (was Re: Proposal: CUDA support; outline, initial patches)
Peter Collingbourne
peter at pcc.me.uk
Mon Nov 29 21:00:32 PST 2010
Hi Chris,
On Mon, Nov 29, 2010 at 02:59:19PM -0800, Chris Lattner wrote:
> > This new patch series is built on top of the old series and replaces
> > patch 11 (which was based on the mistaken assumption that the type
> > qualifiers weren't attributes hiding behind a #define) and implements:
> > - Initial support for device, global, host, constant, shared and
> > launch_bounds attributes. The attributes are recognised and added
> > to the AST but no significant semantic analysis (e.g. checking
> > for incompatible combinations) is performed.
>
> Ok, please trickle the patches in one at a time. Starting here makes sense.
Agree.
> In this patch, please use attribute names like attribute(cuda_device) etc instead of just "device" to avoid ambiguity.
The problem with renaming the attributes is that the nvidia SDK headers
use the plain attribute names without the cuda_. It's important that
we are able to parse those headers to use clang as a frontend for
unmodified CUDA programs. Instead, we could rename the Attr classes
to CUDA*Attr and keep the spelling attributes as they are.
> Also, these attributes should be rejected when not in cuda language mode.
Agree.
> The prerequisite for that is to add a cuda language mode.
Yes, that will be patches 1, 2 from series 3.
Thanks,
--
Peter
More information about the cfe-dev
mailing list