mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 20:32:19 +00:00
Use SmallVector's pop_back_val.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f89e6e6577
commit
e19c6362d2
@ -122,8 +122,7 @@ void SUnit::setDepthDirty() {
|
|||||||
SmallVector<SUnit*, 8> WorkList;
|
SmallVector<SUnit*, 8> WorkList;
|
||||||
WorkList.push_back(this);
|
WorkList.push_back(this);
|
||||||
while (!WorkList.empty()) {
|
while (!WorkList.empty()) {
|
||||||
SUnit *SU = WorkList.back();
|
SUnit *SU = WorkList.pop_back_val();
|
||||||
WorkList.pop_back();
|
|
||||||
if (!SU->isDepthCurrent) continue;
|
if (!SU->isDepthCurrent) continue;
|
||||||
SU->isDepthCurrent = false;
|
SU->isDepthCurrent = false;
|
||||||
for (SUnit::const_succ_iterator I = SU->Succs.begin(),
|
for (SUnit::const_succ_iterator I = SU->Succs.begin(),
|
||||||
@ -136,8 +135,7 @@ void SUnit::setHeightDirty() {
|
|||||||
SmallVector<SUnit*, 8> WorkList;
|
SmallVector<SUnit*, 8> WorkList;
|
||||||
WorkList.push_back(this);
|
WorkList.push_back(this);
|
||||||
while (!WorkList.empty()) {
|
while (!WorkList.empty()) {
|
||||||
SUnit *SU = WorkList.back();
|
SUnit *SU = WorkList.pop_back_val();
|
||||||
WorkList.pop_back();
|
|
||||||
if (!SU->isHeightCurrent) continue;
|
if (!SU->isHeightCurrent) continue;
|
||||||
SU->isHeightCurrent = false;
|
SU->isHeightCurrent = false;
|
||||||
for (SUnit::const_pred_iterator I = SU->Preds.begin(),
|
for (SUnit::const_pred_iterator I = SU->Preds.begin(),
|
||||||
|
Loading…
Reference in New Issue
Block a user