[CUDA] Generate CUDA's printf alloca in its function's entry block.
authorJustin Lebar <jlebar@google.com>
Thu, 28 Jan 2016 23:58:28 +0000 (23:58 +0000)
committerJustin Lebar <jlebar@google.com>
Thu, 28 Jan 2016 23:58:28 +0000 (23:58 +0000)
commitc0e42750da5f4eaecb00ce46e4a5cae8e4cddc3d
tree920ac67d901e453e47d7aa7e796b546df4d3e846
parentbb04f6e28fe49046975297846548dc99e68c82b9
[CUDA] Generate CUDA's printf alloca in its function's entry block.

Summary:
This is necessary to prevent llvm from generating stacksave intrinsics
around this alloca.  NVVM doesn't have a stack, and we don't handle said
intrinsics.

Reviewers: rnk, echristo

Subscribers: cfe-commits, jhen, tra

Differential Revision: http://reviews.llvm.org/D16664

llvm-svn: 259122
clang/lib/CodeGen/CGCUDABuiltin.cpp
clang/test/CodeGenCUDA/printf.cu