I would like to commit this change that enables program scope variables (PSVs) – an OpenCL2.0 feature (Section 6.5.1).
There are three major changes in this patch.
First change removes virtual SC_OpenCLWorkGroupLocal storage type specifier as it conflicts with static
local variables now and prevents diagnosing static local address space variables correctly. Also it doesn’t seem really
necessary since we can identify local AS variable by looking at the AS attribute itself.
Second change makes static local variables as well as global variables allowed in OpenCL2.0 (OpenCL2.0 s6.8 and s6.5.1).
Last change improves diagnostics of allowed ASes for variables in different scopes:
Global or static local variables have to be in global or constant ASes (OpenCL1.2 s6.5, OpenCL2.0 s6.5.1); Non-kernel function variables can’t be declared in local or constant ASes (OpenCL1.1 s6.5.2 and s6.5.3).
variable