[cfe-dev] memory annotation treatment in the compilation of OpenCL code

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Mon Jan 9 23:25:42 PST 2012


Hello,

On 01/09/2012 11:18 PM, Bo Wu wrote:
> Then I changed "__global" to "__local" and generate the IR again, but
> the generated IR is the same as the first one.

When compiling for x86(_64) the address spaces to global and local
probably point to the same target address space (0) so there's no
difference in the final IR.

> I am confused because if the "__local" information is lost when
> generating LLVM IR, how can local memory be used anyway?

Please check this thread from the last March where the local
memory implementation is discussed:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-March/013737.html

Best regards,
-- 
Pekka Jääskeläinen,
a contributor to the Portable OpenCL (http://launchpad.net/pocl)
project which uses the Clang's OpenCL C support




More information about the cfe-dev mailing list