[PATCH] Refactor: Simplify boolean expressions in Hexagon target

Richard legalize at xmission.com
Sun Mar 22 12:55:10 PDT 2015


Hi alexfh, colinl, jverma, echristo, rafael,

Simplify boolean expressions using `true` and `false` with `clang-tidy`

http://reviews.llvm.org/D8523

Files:
  lib/Target/Hexagon/HexagonVLIWPacketizer.cpp

Index: lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
===================================================================
--- lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
+++ lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
@@ -403,10 +403,7 @@
 // or new-value store.
 bool HexagonPacketizerList::isNewifiable(MachineInstr* MI) {
   const HexagonInstrInfo *QII = (const HexagonInstrInfo *) TII;
-  if ( isCondInst(MI) || QII->mayBeNewStore(MI))
-    return true;
-  else
-    return false;
+  return isCondInst(MI) || QII->mayBeNewStore(MI);
 }
 
 bool HexagonPacketizerList::isCondInst (MachineInstr* MI) {

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8523.22431.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150322/bbdf94d6/attachment.bin>


More information about the llvm-commits mailing list