[cfe-dev] [LLVMdev] Language-specific vs target-specific address spaces (was Re: [PATCH] OpenCL support - update on keywords)

Ken Dyck kd at kendyck.com
Thu Mar 3 10:50:13 PST 2011


On Thu, Mar 3, 2011 at 11:38 AM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> Also, to avoid regressions in functionality we should retain the
> ability to qualify a pointer with an LLVM physical address space.
> This can be achieved by allocating another bit in the Qualifiers
> class to indicate whether the address space is a logical or physical
> address space.  Physical address spaces would be accessed using the
> existing __attribute__((address_space)) mechanism, while logical
> spaces would be accessed using language-specific keywords.

If both an __attribute__-style qualifier and an OpenCL-style one are
applied to a type definition, won't the Qualifier's address space
field take on the value of the last of the two to be parsed?

Should we instead reserve _two_ bits for the logical address space
field, and capture the whole OpenCL qualifier there?

-Ken




More information about the cfe-dev mailing list