[PATCH] D28048: [OpenCL] Align fake address space map with the SPIR target maps.

Egor Churaev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 22 01:40:54 PST 2016


echuraev created this revision.
echuraev added a reviewer: Anastasia.
echuraev added subscribers: cfe-commits, bader, yaxunl.

We compile user opencl kernel code with spir triple. But built-ins are written in OpenCL and we compile it with triple x86_64 to be able to use x86 intrinsics. And we need address spaces to match in both cases. So, we change fake address space map in OpenCL for matching with spir.

On CPU address spaces are not really important but we'd like to preserve address space information in order to perform optimizations relying on this info like enhanced alias analysis.


https://reviews.llvm.org/D28048

Files:
  lib/AST/ASTContext.cpp
  test/CodeGen/blocks-opencl.cl
  test/CodeGenOpenCL/address-space-constant-initializers.cl
  test/CodeGenOpenCL/address-spaces-mangling.cl
  test/CodeGenOpenCL/address-spaces.cl
  test/CodeGenOpenCL/cl20-device-side-enqueue.cl
  test/CodeGenOpenCL/const-str-array-decay.cl
  test/CodeGenOpenCL/constant-addr-space-globals.cl
  test/CodeGenOpenCL/local-initializer-undef.cl
  test/CodeGenOpenCL/local.cl
  test/CodeGenOpenCL/memcpy.cl
  test/CodeGenOpenCL/str_literals.cl
  test/SemaOpenCL/extern.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28048.82315.patch
Type: text/x-patch
Size: 24061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161222/47fac656/attachment-0001.bin>


More information about the cfe-commits mailing list