OpenCL C "long" should always have 64 bits

Michele Scandale michele.scandale at gmail.com
Tue Sep 3 10:31:09 PDT 2013


On 09/03/2013 07:08 PM, Tom Stellard wrote:
> On Tue, Sep 03, 2013 at 12:45:21PM -0400, Erik Schnetter wrote:
>> Unfortunately, removing the address space definitions means that overloaded functions do not use address spaces for name mangling. This is bad, because OpenCL C's run-time library defines many functions with signatures that differ only in their address spaces. Clang also contains test cases that explicitly assume that e.g. the "global" address space is number 1, and the "constant" address space is number 2.
>>
> 
> The name mangling works fine when compiling libclc
> (http://libclc.llvm.org/) for the R600 target.  I'm guessing that this
> is because R600 defines its own address space map.  Would it work to add
> an address space map to whatever target you are using?  Or maybe a
> default address space map that targets like R600 can override.

I'm in a quite long discussion about this topic:
- beginning of the discussion
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130715/084011.html
- last part of the discussion where a small brief is reported
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130819/086907.html
- my last patch that introduces target independent mangling with the option for
targets to require mangling based on the address space map
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130826/087185.html

I'd appreciate any feedback about what has been discussed.

Thanks in advance.

-Michele




More information about the cfe-commits mailing list