[PATCH] D9971: Refactor: Simplify boolean conditional return statements in llvm/lib/CodeGen/SelectionDAG
Filipe Cabecinhas
filcab+llvm.phabricator at gmail.com
Sat Jul 25 12:57:16 PDT 2015
filcab added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:2338
@@ -2340,1 +2337,3 @@
+ return SPQ->getHazardRec()->getHazardType(SU, 0) !=
+ ScheduleHazardRecognizer::NoHazard;
}
----------------
Would something like
return (int)SPQ->getCurCycle() < Height ||
SPQ->getHazardRec()->getHazardType(SU, 0) !=
ScheduleHazardRecognizer::NoHazard;
Be more readable, here? There are only two conditions.
================
Comment at: lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:2573
@@ -2581,1 +2572,3 @@
+ return SPQ->getHazardRec()->getHazardType(SU, 0) ==
+ ScheduleHazardRecognizer::NoHazard;
}
----------------
Same comment as for `BUHasStall`
http://reviews.llvm.org/D9971
More information about the llvm-commits
mailing list