SmallVector<Instruction*, 16> DeadInsts;
DeadInsts.push_back(I);
- while (!DeadInsts.empty()) {
+ do {
I = DeadInsts.pop_back_val();
// Null out all of the instruction's operands to see if any operand becomes
}
I->eraseFromParent();
- }
+ } while (!DeadInsts.empty());
return true;
}