forked from OSchip/llvm-project
bccaea57c0
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 |
||
---|---|---|
.. | ||
cuda-annotations.ll | ||
cuda-managed-memory-simple.ll | ||
double-parallel-loop.ll | ||
host-control-flow.ll | ||
host-statement.ll | ||
invalid-kernel.ll | ||
kernel-params-only-some-arrays.ll | ||
kernel-params-scop-parameter.ll | ||
mostly-sequential.ll | ||
non-read-only-scalars.ll | ||
non-zero-array-offset.ll | ||
only-part-of-array-modified.ll | ||
parametric-loop-bound.ll | ||
phi-nodes-in-kernel.ll | ||
private-memory.ll | ||
region-stmt.ll | ||
remove-dead-instructions-in-stmt-2.ll | ||
remove-dead-instructions-in-stmt.ll | ||
run-time-check.ll | ||
scalar-param-and-value-32-bit.ll | ||
scalar-param-and-value-use.ll | ||
scalar-parameter-fp128.ll | ||
scalar-parameter-half.ll | ||
scalar-parameter-i80.ll | ||
scalar-parameter-i120.ll | ||
scalar-parameter-i128.ll | ||
scalar-parameter-i3000.ll | ||
scalar-parameter-ppc_fp128.ll | ||
scalar-parameter-x86_fp80.ll | ||
scalar-parameter.ll | ||
scheduler-timeout.ll | ||
shared-memory-scalar.ll | ||
shared-memory-two-dimensional.ll | ||
shared-memory.ll | ||
size-cast.ll | ||
unknown-fn-call-not-copied-into-kernel.ll | ||
untouched-arrays.ll |