summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-01-29 13:02:09 +0000
committerDan Gohman <gohman@apple.com>2008-01-29 13:02:09 +0000
commit70de4cb1cd4d8ec82260bd861aa91f639cbc5eb6 (patch)
treef1c41dbbb10c04adfbf4b213ab2c1965dee32d82 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
parentcf8827a282e6e133d7a153673b1c05c58817d604 (diff)
downloadbcm5719-llvm-70de4cb1cd4d8ec82260bd861aa91f639cbc5eb6.tar.gz
bcm5719-llvm-70de4cb1cd4d8ec82260bd861aa91f639cbc5eb6.zip
Use empty() instead of comparing size() with zero.
llvm-svn: 46514
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
index 5c7422c97a2..42d54f6622b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
@@ -169,7 +169,7 @@ void ScheduleDAGList::ListScheduleTopDown() {
// All leaves to Available queue.
for (unsigned i = 0, e = SUnits.size(); i != e; ++i) {
// It is available if it has no predecessors.
- if (SUnits[i].Preds.size() == 0 && &SUnits[i] != Entry) {
+ if (SUnits[i].Preds.empty() && &SUnits[i] != Entry) {
AvailableQueue->push(&SUnits[i]);
SUnits[i].isAvailable = SUnits[i].isPending = true;
}
@@ -477,7 +477,7 @@ void LatencyPriorityQueue::CalculatePriorities() {
std::vector<std::pair<const SUnit*, unsigned> > WorkList;
for (unsigned i = 0, e = SUnits->size(); i != e; ++i) {
const SUnit *SU = &(*SUnits)[i];
- if (SU->Succs.size() == 0)
+ if (SU->Succs.empty())
WorkList.push_back(std::make_pair(SU, 0U));
}
OpenPOWER on IntegriCloud