[PATCH] D16664: [CUDA] Generate CUDA's printf alloca in its function's entry block.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 10:27:13 PST 2016


jlebar marked an inline comment as done.

================
Comment at: lib/CodeGen/CGCUDABuiltin.cpp:109
@@ -106,1 +108,3 @@
+    // stacksave/stackrestore intrinsics, which cause ptxas to choke.
+    auto *Alloca = new llvm::AllocaInst(
         llvm::Type::getInt8Ty(Ctx), llvm::ConstantInt::get(Int32Ty, BufSize),
----------------
echristo wrote:
> Not quite, you'll want to use AllocaInsertPt for this or even CreateTempAlloca.
> 
> 
Aha.  Used AllocaInsertPt because it doesn't seem that there's an overload of CreateTempAlloca that takes an explicit size.


http://reviews.llvm.org/D16664





More information about the cfe-commits mailing list