mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[NFCI][Local] TryToSimplifyUncondBranchFromEmptyBlock(): use DeleteDeadBlocks()
This commit is contained in:
parent
9892711a85
commit
22691d2522
@ -1150,12 +1150,11 @@ bool llvm::TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB,
|
||||
assert(succ_empty(BB) && "The successor list of BB isn't empty before "
|
||||
"applying corresponding DTU updates.");
|
||||
|
||||
if (DTU) {
|
||||
if (DTU)
|
||||
DTU->applyUpdates(Updates);
|
||||
DTU->deleteBB(BB);
|
||||
} else {
|
||||
BB->eraseFromParent(); // Delete the old basic block.
|
||||
}
|
||||
|
||||
DeleteDeadBlock(BB, DTU);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user