]> granicus.if.org Git - clang/commit
[OpenCL] Align fake address space map with the SPIR target maps.
authorEgor Churaev <egor.churaev@gmail.com>
Fri, 23 Dec 2016 16:11:25 +0000 (16:11 +0000)
committerEgor Churaev <egor.churaev@gmail.com>
Fri, 23 Dec 2016 16:11:25 +0000 (16:11 +0000)
commitd018ab0a692bb12b9b88a24555354d81cdb779dc
treead1515a1b3bb7f338b793329cbac82393b73f9b4
parent0a3f510ca42ba60aeab099e8d06fdbfe64d8a085
[OpenCL] Align fake address space map with the SPIR target maps.

Summary:
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.

Reviewers: pekka.jaaskelainen, Anastasia

Subscribers: pekka.jaaskelainen, yaxunl, bader, cfe-commits

Differential Revision: https://reviews.llvm.org/D28048

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290436 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
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