[PATCH] [CUDA] Implemented __nvvm_atom_*_gen_* builtins.

Eli Bendersky eliben at google.com
Wed Jun 24 15:46:20 PDT 2015


================
Comment at: lib/CodeGen/CGBuiltin.cpp:174
@@ +173,3 @@
+
+  Value *Args[3];
+  Args[0] = CGF.Builder.CreateBitCast(DestPtr, IntPtrType);
----------------
tra wrote:
> eliben wrote:
> > Would universal initialization be simpler here?
> > 
> > Value *Args[3] = {CGF.Builder.CreateBi......, CGF.EmitScalar...}
> > 
> > 
> Args[1] creation is a two-step operation which gets in a way.
You could obtain the type from Args[1] through the cast (getSrcTy) and avoid the awkward repeated assignment to Args[1].

But this isn't super important - up to you.

http://reviews.llvm.org/D10666

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list