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

Artem Belevich tra at google.com
Thu Jun 25 11:27:47 PDT 2015


================
Comment at: lib/CodeGen/CGBuiltin.cpp:190
@@ +189,3 @@
+                                                llvm::SequentiallyConsistent);
+  Value *Result;
+  if (ReturnBool) {
----------------
eliben wrote:
> 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).
I've removed temp variable altogether and added comments explaining what the code does.

http://reviews.llvm.org/D10666

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






More information about the cfe-commits mailing list