OpenCL address space and mangling

Pekka Jääskeläinen pekka.jaaskelainen at
Wed Jul 24 08:36:10 PDT 2013

On 07/24/2013 05:49 PM, Michele Scandale wrote:
> As a temporary solution, if one needed the logical address space information in
> the IR too for specific purpose (like OpenCL specific optimization), can still
> override the address space map of the target.

FWIW, we do it this way in pocl now. That is, we force known address space ids
to the OpenCL address spaces via the fake address space map feature so the 
OpenCL C kernel compiler passes can refer to non-target-specific address spaces
during the work group generation.

Then, as a final pass, these IDs can be mapped back to the target's preferred
ones. The final pass is not needed if the target can automatically remap them
in the backend, like is the case with single AS CPUs where everything will be
finally mapped to AS0.


More information about the cfe-commits mailing list