summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorSiddharth Bhat <siddu.druid@gmail.com>2017-06-12 11:41:09 +0000
committerSiddharth Bhat <siddu.druid@gmail.com>2017-06-12 11:41:09 +0000
commitbccaea57c00d5227830e3c296636d2b54c080a92 (patch)
treebb1bac7449f699c944b2dd92d2fc2d336c66af56 /lldb/packages/Python/lldbsuite/test
parentb079c8b35b40eeb41141d14e0f497d3fe5dcf9e9 (diff)
downloadbcm5719-llvm-bccaea57c00d5227830e3c296636d2b54c080a92.tar.gz
bcm5719-llvm-bccaea57c00d5227830e3c296636d2b54c080a92.zip
[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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud