llvm-project/polly/test/GPGPU
Siddharth Bhat bccaea57c0 [Polly] [PPCGCodeGeneration] Skip Scops which contain function pointers.
In `PPCGCodeGeneration`, we try to take the references of every `Value`
that is used within a Scop to offload to the kernel. This occurs in
`GPUNodeBuilder::createLaunchParameters`.

This breaks if one of the values is a function pointer, since one of
these cases will trigger:

1. We try to to take the references of an intrinsic function, and this
breaks at `verifyModule`, since it is illegal to take the reference of
an intrinsic.

2. We manage to take the reference to a function, but this fails at
`verifyModule` since the function will not be present in the module that
is created in the kernel.

3. Even if `verifyModule` succeeds (which should not occur), we would
then try to call a *host function* from the *device*, which is
illegal runtime behaviour.

So, we disable this entire range of possibilities by simply not allowing
function references within a `Scop` which corresponds to a kernel.

However, note that this is too conservative. We *can* allow intrinsics
within kernels if the backend can lower the intrinsic correctly. For
example, an intrinsic like `llvm.powi.*` can actually be lowered by the `NVPTX`
backend.

We will now gradually whitelist intrinsics which are known to be safe.

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

llvm-svn: 305185
2017-06-12 11:41:09 +00:00
..
cuda-annotations.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
cuda-managed-memory-simple.ll [Polly][PPCGCodeGen] OpenCL now gets kernel argument size from PPCG CodeGen 2017-05-09 10:45:52 +00:00
double-parallel-loop.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
host-control-flow.ll [FIX] Fix regression caused by c29f4ed, testcase matches output 2017-05-12 11:34:51 +00:00
host-statement.ll [GPGPU] Ensure arrays where only parts are modified are copied to GPU 2016-08-10 10:58:19 +00:00
invalid-kernel.ll GPGPU: Bail out gracefully in case of invalid IR 2016-09-12 06:06:31 +00:00
kernel-params-only-some-arrays.ll [Polly][PPCGCodeGen] OpenCL now gets kernel argument size from PPCG CodeGen 2017-05-09 10:45:52 +00:00
kernel-params-scop-parameter.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
mostly-sequential.ll GPGPU: add missing REQUIRES line to test case 2016-09-18 08:57:38 +00:00
non-read-only-scalars.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
non-zero-array-offset.ll GPGPU: Do not assume arrays start at 0 2016-09-15 14:05:58 +00:00
only-part-of-array-modified.ll [GPGPU] Ensure arrays where only parts are modified are copied to GPU 2016-08-10 10:58:19 +00:00
parametric-loop-bound.ll [Polly][PPCGCodeGen] OpenCL now gets kernel argument size from PPCG CodeGen 2017-05-09 10:45:52 +00:00
phi-nodes-in-kernel.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
private-memory.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
region-stmt.ll GPGPU: Allow region statements 2016-09-13 08:42:10 +00:00
remove-dead-instructions-in-stmt-2.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
remove-dead-instructions-in-stmt.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
run-time-check.ll [GPGPU] Create code to verify run-time conditions 2016-08-08 17:35:55 +00:00
scalar-param-and-value-32-bit.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-param-and-value-use.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter-fp128.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter-half.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter-i80.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter-i120.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter-i128.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter-i3000.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter-ppc_fp128.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter-x86_fp80.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scalar-parameter.ll [tests] Specify the dependence to NVPTX backend for Polly ACC test cases 2017-03-03 03:38:50 +00:00
scheduler-timeout.ll GPGPU: Detect read-only scalar arrays ... 2016-09-17 19:22:18 +00:00
shared-memory-scalar.ll GPGPU: Detect read-only scalar arrays ... 2016-09-17 19:22:18 +00:00
shared-memory-two-dimensional.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
shared-memory.ll [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility 2017-04-25 08:08:29 +00:00
size-cast.ll [Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGen 2017-05-07 21:03:46 +00:00
unknown-fn-call-not-copied-into-kernel.ll [Polly] [PPCGCodeGeneration] Skip Scops which contain function pointers. 2017-06-12 11:41:09 +00:00
untouched-arrays.ll Add missing 'REQUIRES' line 2016-09-11 13:42:42 +00:00