forked from OSchip/llvm-project
parent
6149ac8991
commit
5093213c40
|
@ -145,15 +145,13 @@ bool ADCE::dropReferencesOfDeadInstructionsInLiveBlock(BasicBlock *BB) {
|
|||
//
|
||||
PN->replaceAllUsesWith(Constant::getNullValue(PN->getType()));
|
||||
|
||||
} else {
|
||||
if (isa<CallInst>(I))
|
||||
++NumCallRemoved;
|
||||
else
|
||||
++NumInstRemoved;
|
||||
|
||||
// Delete the instruction...
|
||||
BB->getInstList().erase(I++);
|
||||
++I;
|
||||
BB->getInstList().erase(PN);
|
||||
Changed = true;
|
||||
++NumInstRemoved;
|
||||
} else {
|
||||
++I;
|
||||
}
|
||||
} else {
|
||||
++I;
|
||||
|
|
Loading…
Reference in New Issue