GPGPU: generate code for ScopStatements
authorTobias Grosser <tobias@grosser.es>
Thu, 21 Jul 2016 13:15:59 +0000 (13:15 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 21 Jul 2016 13:15:59 +0000 (13:15 +0000)
commitedb885cb1230b0693f68d13e5de3baf6b156ef73
treedb43287e5d49a329ee66e97b72c41dbf27b38611
parent86083da0eccc2ad307d45e3427443743b54ac6d4
GPGPU: generate code for ScopStatements

This change introduces the actual compute code in the GPU kernels. To ensure
all values referenced from the statements in the GPU kernel are indeed available
we scan all ScopStmts in the GPU kernel for references to llvm::Values that
are not yet covered by already modeled outer loop iterators, parameters, or
array base pointers and also pass these additional llvm::Values to the
GPU kernel.

For arrays used in the GPU kernel we introduce a new ScopArrayInfo object, which
is referenced by the newly generated access functions within the GPU kernel and
which is used to help with code generation.

llvm-svn: 276270
polly/lib/CodeGen/PPCGCodeGeneration.cpp
polly/test/GPGPU/double-parallel-loop.ll
polly/test/GPGPU/host-control-flow.ll
polly/test/GPGPU/kernel-params-only-some-arrays.ll