echristo added inline comments.

================
Comment at: lib/CodeGen/CGCUDABuiltin.cpp:109
@@ -106,1 +108,3 @@
+    // stacksave/stackrestore intrinsics, which cause our nvvm backend to 
choke.
+    auto *Alloca = new llvm::AllocaInst(
         llvm::Type::getInt8Ty(Ctx), llvm::ConstantInt::get(Int32Ty, BufSize),
----------------
rnk wrote:
> You can still use CreateTempAlloca by making an `[i8 x N]` LLVM type. You'll 
> have to use CreateStructGEP below for forming GEPs. Overall I think that'd be 
> nicer, since you don't need to worry about insertion at all.
+1 :)

================
Comment at: lib/CodeGen/CGCUDABuiltin.cpp:112
@@ +111,3 @@
+        BufAlign, "printf_arg_buf");
+    Alloca->insertAfter(AllocaInsertPt);
+    BufferPtr = Alloca;
----------------
Also you'd have wanted to insert it before anyhow. 


http://reviews.llvm.org/D16664



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to