[PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility
authorSiddharth Bhat <siddu.druid@gmail.com>
Tue, 25 Apr 2017 08:08:29 +0000 (08:08 +0000)
committerSiddharth Bhat <siddu.druid@gmail.com>
Tue, 25 Apr 2017 08:08:29 +0000 (08:08 +0000)
commitd277feda9121245ddf7d619a67e5338444e52937
tree5cc6816ecdb22225b0bbf1a046ef902cd9c4f9e1
parent561247a8238a094bc4aa35376a2fd076bef51fe6
[PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibility

Added a small change to the way pointer arguments are set in the kernel
code generation. The way the pointer is retrieved now, specifically requests
global address space to be annotated. This is necessary, if the IR should be
run through NVPTX to generate OpenCL compatible PTX.

The changes do not affect the PTX Strings generated for the CUDA target
(nvptx64-nvidia-cuda), but are necessary for OpenCL (nvptx64-nvidia-nvcl).

Additionally, the data layout has been updated to what the NVPTX Backend requests/recommends.

Contributed-by: Philipp Schaad
Reviewers: Meinersbur, grosser, bollu

Reviewed By: grosser, bollu

Subscribers: jlebar, pollydev, llvm-commits, nemanjai, yaxunl, Anastasia

Tags: #polly

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

llvm-svn: 301299
12 files changed:
polly/lib/CodeGen/PPCGCodeGeneration.cpp
polly/test/GPGPU/cuda-annotations.ll
polly/test/GPGPU/host-control-flow.ll
polly/test/GPGPU/kernel-params-only-some-arrays.ll
polly/test/GPGPU/kernel-params-scop-parameter.ll
polly/test/GPGPU/non-read-only-scalars.ll
polly/test/GPGPU/phi-nodes-in-kernel.ll
polly/test/GPGPU/private-memory.ll
polly/test/GPGPU/remove-dead-instructions-in-stmt-2.ll
polly/test/GPGPU/remove-dead-instructions-in-stmt.ll
polly/test/GPGPU/shared-memory-two-dimensional.ll
polly/test/GPGPU/shared-memory.ll