llvm-project/clang/lib/Driver
Alexey Sotkin 20f65928e1 [OpenCL] Add '-cl-uniform-work-group-size' compile option
Summary:
OpenCL 2.0 specification defines '-cl-uniform-work-group-size' option,
which requires that the global work-size be a multiple of the work-group
size specified to clEnqueueNDRangeKernel and allows optimizations that
are made possible by this restriction.

The patch introduces the support of this option.

To keep information about whether an OpenCL kernel has uniform work
group size or not, clang generates 'uniform-work-group-size' function
attribute for every kernel:
- "uniform-work-group-size"="true" for OpenCL 1.2 and lower,
- "uniform-work-group-size"="true" for OpenCL 2.0 and higher if
 '-cl-uniform-work-group-size' option was specified,
- "uniform-work-group-size"="false" for OpenCL 2.0 and higher if no
 '-cl-uniform-work-group-size' options was specified.

If the function is not an OpenCL kernel, 'uniform-work-group-size'
attribute isn't generated.

Patch by: krisb

Reviewers: yaxunl, Anastasia, b-sumner

Reviewed By: yaxunl, Anastasia

Subscribers: nhaehnle, yaxunl, Anastasia, cfe-commits

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

llvm-svn: 325771
2018-02-22 11:54:14 +00:00
..
ToolChains [OpenCL] Add '-cl-uniform-work-group-size' compile option 2018-02-22 11:54:14 +00:00
Action.cpp Fix MSVC "not all control paths return a value" warning 2016-10-28 10:09:35 +00:00
CMakeLists.txt [RISCV] Add the RISCV target and compiler driver 2018-01-11 13:36:56 +00:00
Compilation.cpp [Driver] Make clang/cc conforms to UNIX standard 2017-11-10 01:32:47 +00:00
Distro.cpp [Driver] add initial support for alpine linux 2017-11-19 00:08:12 +00:00
Driver.cpp Further cleanup to Driver mode code, as suggested by dblaikie [NFC] 2018-02-12 17:47:01 +00:00
DriverOptions.cpp Revert "Revert r311552: [Bash-autocompletion] Add support for static analyzer flags" 2017-08-29 00:09:31 +00:00
InputInfo.h
Job.cpp Revert 320391: Certain targets are failing, pulling back to diagnose. 2017-12-11 18:14:51 +00:00
Multilib.cpp Multilib: add dump methods 2017-05-05 21:30:13 +00:00
Phases.cpp
SanitizerArgs.cpp When multiple sanitizers are enabled (ubsan + something else), use all relevant blacklists. 2018-02-20 23:17:41 +00:00
Tool.cpp Rename the version of ConstructJob for multiple outputs to ConstructJobMultipleOutputs. 2016-11-03 15:41:50 +00:00
ToolChain.cpp [Sanitizers] Basic Solaris sanitizer support (PR 33274) 2018-02-05 23:59:13 +00:00
Types.cpp [Driver][OpenMP] Update actions builder to create unbundling action when necessary. 2016-10-27 18:00:51 +00:00
XRayArgs.cpp FreeBSD driver / Xray flags moving pthread to compile flags. 2018-02-22 06:31:40 +00:00