1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

improve comment.

llvm-svn: 86723
This commit is contained in:
Chris Lattner 2009-11-10 21:45:09 +00:00
parent fca84b3dff
commit f48b199c43

View File

@ -142,11 +142,14 @@ bool JumpThreading::runOnFunction(Function &F) {
++BBI;
// If the terminator is the only non-phi instruction, try to nuke it.
if (BBI->isTerminator()) {
bool Erased = LoopHeaders.erase(BB);
// Since TryToSimplifyUncondBranchFromEmptyBlock may delete the
// block, we have to make sure it isn't in the LoopHeaders set. We
// reinsert afterward in the rare case when the block isn't deleted.
bool ErasedFromLoopHeaders = LoopHeaders.erase(BB);
if (TryToSimplifyUncondBranchFromEmptyBlock(BB))
Changed = true;
else if (Erased)
else if (ErasedFromLoopHeaders)
LoopHeaders.insert(BB);
}
}