[PATCH] D9971: Refactor: Simplify boolean conditional return statements in llvm/lib/CodeGen/SelectionDAG

Richard via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 09:21:47 PST 2016


LegalizeAdulthood added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:2338
@@ -2340,1 +2337,3 @@
+  return SPQ->getHazardRec()->getHazardType(SU, 0) !=
+         ScheduleHazardRecognizer::NoHazard;
 }
----------------
filcab wrote:
> Would something like
>   return (int)SPQ->getCurCycle() < Height ||
>          SPQ->getHazardRec()->getHazardType(SU, 0) !=
>              ScheduleHazardRecognizer::NoHazard;
> 
> Be more readable, here? There are only two conditions.
To be clear: I'm just running clang-tidy on the code and submitting the diffs.  None of these changes were created by hand.


http://reviews.llvm.org/D9971





More information about the llvm-commits mailing list