mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Clean up some uses of std::distance, now that we have allnodes_size.
llvm-svn: 52545
This commit is contained in:
parent
6a75f18b3b
commit
10e3188458
@ -313,8 +313,7 @@ static void ComputeTopDownOrdering(SelectionDAG &DAG,
|
||||
}
|
||||
|
||||
assert(Order.size() == Visited.size() &&
|
||||
Order.size() ==
|
||||
(unsigned)std::distance(DAG.allnodes_begin(), DAG.allnodes_end()) &&
|
||||
Order.size() == DAG.allnodes_size() &&
|
||||
"Error: DAG is cyclic!");
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ void ScheduleDAG::BuildSchedUnits() {
|
||||
// Reserve entries in the vector for each of the SUnits we are creating. This
|
||||
// ensure that reallocation of the vector won't happen, so SUnit*'s won't get
|
||||
// invalidated.
|
||||
SUnits.reserve(std::distance(DAG.allnodes_begin(), DAG.allnodes_end()));
|
||||
SUnits.reserve(DAG.allnodes_size());
|
||||
|
||||
for (SelectionDAG::allnodes_iterator NI = DAG.allnodes_begin(),
|
||||
E = DAG.allnodes_end(); NI != E; ++NI) {
|
||||
@ -105,7 +105,7 @@ void ScheduleDAG::BuildSchedUnits() {
|
||||
continue;
|
||||
|
||||
// If this node has already been processed, stop now.
|
||||
if (SUnitMap[NI].size()) continue;
|
||||
if (!SUnitMap[NI].empty()) continue;
|
||||
|
||||
SUnit *NodeSUnit = NewSUnit(NI);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user