HomePhabricator

[OpenCL] Fix file-scope const sampler variable for 2.0

Description

[OpenCL] Fix file-scope const sampler variable for 2.0

OpenCL spec v2.0 s6.13.14:

Samplers can also be declared as global constants in the program
source using the following syntax.

const sampler_t <sampler name> = <value>

This works fine for OpenCL 1.2 but fails for 2.0, because clang duduces
address space of file-scope const sampler variable to be in global address
space whereas spec v2.0 s6.9.b forbids file-scope sampler variable to be
in global address space.

The fix is not to deduce address space for file-scope sampler variables.

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

Details

Committed
yaxunlMay 27 2019, 4:19 AM
Differential Revision
D62197: [OpenCL] Fix file-scope const sampler variable for 2.0
Parents
rL361756: [ARM GlobalISel] Un-XFAIL some tests. NFC
Branches
Unknown
Tags
Unknown