mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Don't use for loops for code that is only intended to execute once. No
intended functionality change. Thanks to Ahmed Charles for spotting it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
828ea3849a
commit
40e466091e
@ -2747,8 +2747,9 @@ ObjCARCOpt::VisitBottomUp(BasicBlock *BB,
|
||||
|
||||
// Merge the states from each successor to compute the initial state
|
||||
// for the current block.
|
||||
for (BBState::edge_iterator SI(MyStates.succ_begin()),
|
||||
SE(MyStates.succ_end()); SI != SE; ++SI) {
|
||||
BBState::edge_iterator SI(MyStates.succ_begin()),
|
||||
SE(MyStates.succ_end());
|
||||
if (SI != SE) {
|
||||
const BasicBlock *Succ = *SI;
|
||||
DenseMap<const BasicBlock *, BBState>::iterator I = BBStates.find(Succ);
|
||||
assert(I != BBStates.end());
|
||||
@ -2760,7 +2761,6 @@ ObjCARCOpt::VisitBottomUp(BasicBlock *BB,
|
||||
assert(I != BBStates.end());
|
||||
MyStates.MergeSucc(I->second);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Visit all the instructions, bottom-up.
|
||||
@ -2935,8 +2935,9 @@ ObjCARCOpt::VisitTopDown(BasicBlock *BB,
|
||||
|
||||
// Merge the states from each predecessor to compute the initial state
|
||||
// for the current block.
|
||||
for (BBState::edge_iterator PI(MyStates.pred_begin()),
|
||||
PE(MyStates.pred_end()); PI != PE; ++PI) {
|
||||
BBState::edge_iterator PI(MyStates.pred_begin()),
|
||||
PE(MyStates.pred_end());
|
||||
if (PI != PE) {
|
||||
const BasicBlock *Pred = *PI;
|
||||
DenseMap<const BasicBlock *, BBState>::iterator I = BBStates.find(Pred);
|
||||
assert(I != BBStates.end());
|
||||
@ -2948,7 +2949,6 @@ ObjCARCOpt::VisitTopDown(BasicBlock *BB,
|
||||
assert(I != BBStates.end());
|
||||
MyStates.MergePred(I->second);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Visit all the instructions, top-down.
|
||||
|
Loading…
x
Reference in New Issue
Block a user