mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Minor code simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f900f7b5a2
commit
1578f8486d
@ -177,7 +177,7 @@ void SUnit::setHeightToAtLeast(unsigned NewHeight) {
|
|||||||
void SUnit::ComputeDepth() {
|
void SUnit::ComputeDepth() {
|
||||||
SmallVector<SUnit*, 8> WorkList;
|
SmallVector<SUnit*, 8> WorkList;
|
||||||
WorkList.push_back(this);
|
WorkList.push_back(this);
|
||||||
while (!WorkList.empty()) {
|
do {
|
||||||
SUnit *Cur = WorkList.back();
|
SUnit *Cur = WorkList.back();
|
||||||
|
|
||||||
bool Done = true;
|
bool Done = true;
|
||||||
@ -202,7 +202,7 @@ void SUnit::ComputeDepth() {
|
|||||||
}
|
}
|
||||||
Cur->isDepthCurrent = true;
|
Cur->isDepthCurrent = true;
|
||||||
}
|
}
|
||||||
}
|
} while (!WorkList.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ComputeHeight - Calculate the maximal path from the node to the entry.
|
/// ComputeHeight - Calculate the maximal path from the node to the entry.
|
||||||
@ -210,7 +210,7 @@ void SUnit::ComputeDepth() {
|
|||||||
void SUnit::ComputeHeight() {
|
void SUnit::ComputeHeight() {
|
||||||
SmallVector<SUnit*, 8> WorkList;
|
SmallVector<SUnit*, 8> WorkList;
|
||||||
WorkList.push_back(this);
|
WorkList.push_back(this);
|
||||||
while (!WorkList.empty()) {
|
do {
|
||||||
SUnit *Cur = WorkList.back();
|
SUnit *Cur = WorkList.back();
|
||||||
|
|
||||||
bool Done = true;
|
bool Done = true;
|
||||||
@ -235,7 +235,7 @@ void SUnit::ComputeHeight() {
|
|||||||
}
|
}
|
||||||
Cur->isHeightCurrent = true;
|
Cur->isHeightCurrent = true;
|
||||||
}
|
}
|
||||||
}
|
} while (!WorkList.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or
|
/// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or
|
||||||
@ -467,7 +467,7 @@ void ScheduleDAGTopologicalSort::DFS(const SUnit *SU, int UpperBound,
|
|||||||
WorkList.reserve(SUnits.size());
|
WorkList.reserve(SUnits.size());
|
||||||
|
|
||||||
WorkList.push_back(SU);
|
WorkList.push_back(SU);
|
||||||
while (!WorkList.empty()) {
|
do {
|
||||||
SU = WorkList.back();
|
SU = WorkList.back();
|
||||||
WorkList.pop_back();
|
WorkList.pop_back();
|
||||||
Visited.set(SU->NodeNum);
|
Visited.set(SU->NodeNum);
|
||||||
@ -482,7 +482,7 @@ void ScheduleDAGTopologicalSort::DFS(const SUnit *SU, int UpperBound,
|
|||||||
WorkList.push_back(SU->Succs[I].getSUnit());
|
WorkList.push_back(SU->Succs[I].getSUnit());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} while (!WorkList.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shift - Renumber the nodes so that the topological ordering is
|
/// Shift - Renumber the nodes so that the topological ordering is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user