[PATCH] Refactor: Simplify boolean conditional return statements in lib/Target/NVPTX

Jingyue Wu jingyue at google.com
Mon Jun 1 14:26:34 PDT 2015


other than that LGTM. Pretty useful tool! Thanks.


================
Comment at: lib/Target/NVPTX/NVPTXUtilities.cpp:348
@@ -349,3 +347,3 @@
 bool llvm::isMemorySpaceTransferIntrinsic(Intrinsic::ID id) {
-  if (id == Intrinsic::nvvm_ptr_local_to_gen ||
+  return id == Intrinsic::nvvm_ptr_local_to_gen ||
       id == Intrinsic::nvvm_ptr_shared_to_gen ||
----------------
```
return (id == Intrinsics::xxx) ||
       (id == Intrinsics::yyy) ||
```
makes the code more aligned.

http://reviews.llvm.org/D9983

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






More information about the llvm-commits mailing list