mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
[LoopSimplify] Simplify how we compute UniqueExit
Summary: Simplify how we compute UniqueExit. Reuse ExitBlockSet. Reviewers: sanjoy, efriedma, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30182 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fbff24df0b
commit
141d242f5a
@ -645,14 +645,7 @@ ReprocessLoop:
|
||||
// loop-invariant instructions out of the way to open up more
|
||||
// opportunities, and the disadvantage of having the responsibility
|
||||
// to preserve dominator information.
|
||||
bool UniqueExit = true;
|
||||
if (!ExitBlocks.empty())
|
||||
for (unsigned i = 1, e = ExitBlocks.size(); i != e; ++i)
|
||||
if (ExitBlocks[i] != ExitBlocks[0]) {
|
||||
UniqueExit = false;
|
||||
break;
|
||||
}
|
||||
if (UniqueExit) {
|
||||
if (ExitBlockSet.size() == 1) {
|
||||
for (unsigned i = 0, e = ExitingBlocks.size(); i != e; ++i) {
|
||||
BasicBlock *ExitingBlock = ExitingBlocks[i];
|
||||
if (!ExitingBlock->getSinglePredecessor()) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user