[GPGPU] Make sure managed arrays are prepared at the beginning of the scop
authorTobias Grosser <tobias@grosser.es>
Sun, 6 Aug 2017 11:10:38 +0000 (11:10 +0000)
committerTobias Grosser <tobias@grosser.es>
Sun, 6 Aug 2017 11:10:38 +0000 (11:10 +0000)
commitb99c11710c1799e38b6503e72503df1665c17449
treed62d1e68ec6e24c70b48e6e6b060488a467b413e
parentb5bf016015a5e2d224042eca02576a896318966f
[GPGPU] Make sure managed arrays are prepared at the beginning of the scop

Summary:
This resolves some "instruction does not dominate use" errors, as we used to
prepare the arrays at the location of the first kernel, which not necessarily
dominated all other kernel calls.

Reviewers: Meinersbur, bollu, singam-sanjay

Subscribers: nemanjai, pollydev, llvm-commits, kbarton

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

llvm-svn: 310196
polly/lib/CodeGen/PPCGCodeGeneration.cpp
polly/test/GPGPU/cuda-managed-memory-simple.ll
polly/test/GPGPU/managed-pointers-preparation.ll [new file with mode: 0644]