[OpenCL] Always emit alloca in entry block for enqueue_kernel builtin
authorScott Linder <scott@scottlinder.com>
Fri, 3 Aug 2018 15:50:52 +0000 (15:50 +0000)
committerScott Linder <scott@scottlinder.com>
Fri, 3 Aug 2018 15:50:52 +0000 (15:50 +0000)
commit91f578467ce92eda271182f4d431cdf5614a44e3
tree8c7cd06976fc237cdda1a13501721b67f071a3ff
parentfaa1ff16c1716d92d907060f713a14fbca4a7ea7
[OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

Ensures the statically sized alloca is not converted to DYNAMIC_STACKALLOC
later because it is not in the entry block.

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

llvm-svn: 338899
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
clang/test/CodeGenOpenCL/enqueue-kernel-non-entry-block.cl [new file with mode: 0644]