git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139023
91177308-0d34-0410-b5e6-
96231b3b80d8
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
if (Visited.count(BB)) continue;
- // Delete the instructions backwards, as it has a reduced likelihood of
- // having to update as many def-use and use-def chains.
+ // Delete the instructions.
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
Instruction *Inst = &*I++;
if (isa<TerminatorInst>(Inst))
if (isa<TerminatorInst>(BB->begin()))
return;
- // Delete the instructions backwards, as it has a reduced likelihood of
- // having to update as many def-use and use-def chains.
+ // Delete the instructions.
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
Instruction *Inst = &*I++;
if (isa<TerminatorInst>(Inst))