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

Eli Bendersky eliben at google.com
Wed Jun 24 15:50:51 PDT 2015


LGTM

I'd move the NVPTX builtin emission code to its own file unless others have strong objections, but looks good otherwise.


================
Comment at: lib/CodeGen/CGBuiltin.cpp:190
@@ +189,3 @@
+                                                llvm::SequentiallyConsistent);
+  Value *Result;
+  if (ReturnBool) {
----------------
I would just "return EmitFromInt" and "return CreateZExt" inside the if() and else, and avoid this temporary. Then the first builder call in each clause can be assigned to a more meaningful name ("Result" is very generic).

http://reviews.llvm.org/D10666

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






More information about the cfe-commits mailing list