mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86723 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f3183f6da6
commit
6f84a5feee
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user