We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f850d8a commit 2d0fcbaCopy full SHA for 2d0fcba
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -3248,16 +3248,8 @@ static void removeUnusedBlocksFromParent(ArrayRef<BasicBlock *> BBs) {
3248
return false;
3249
};
3250
3251
- while (true) {
3252
- bool Changed = false;
3253
- for (BasicBlock *BB : make_early_inc_range(BBsToErase)) {
3254
- if (HasRemainingUses(BB)) {
3255
- BBsToErase.erase(BB);
3256
- Changed = true;
3257
- }
3258
3259
- if (!Changed)
3260
- break;
+ while (BBsToErase.remove_if(HasRemainingUses)) {
+ // Try again if anything was removed.
3261
}
3262
3263
SmallVector<BasicBlock *, 7> BBVec(BBsToErase.begin(), BBsToErase.end());
0 commit comments