mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 01:42:09 +00:00
Remove useless check.
Patch by Matthijs Kooijman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51154 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bdb6ca178c
commit
8dbd9ada30
@ -109,13 +109,9 @@ bool TailDup::shouldEliminateUnconditionalBranch(TerminatorInst *TI) {
|
||||
if (!DTI->use_empty())
|
||||
return false;
|
||||
|
||||
// Do not bother working on dead blocks...
|
||||
pred_iterator PI = pred_begin(Dest), PE = pred_end(Dest);
|
||||
if (PI == PE && Dest != Dest->getParent()->begin())
|
||||
return false; // It's just a dead block, ignore it...
|
||||
|
||||
// Also, do not bother with blocks with only a single predecessor: simplify
|
||||
// Do not bother with blocks with only a single predecessor: simplify
|
||||
// CFG will fold these two blocks together!
|
||||
pred_iterator PI = pred_begin(Dest), PE = pred_end(Dest);
|
||||
++PI;
|
||||
if (PI == PE) return false; // Exactly one predecessor!
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user