mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Avoid calling getUniqueExitBlocks from within LoopSimplify, as it depends
on loops having dedicated exits, which LoopSimplify can no longer always guarantee. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -241,7 +241,14 @@ ReprocessLoop:
|
|||||||
// loop-invariant instructions out of the way to open up more
|
// loop-invariant instructions out of the way to open up more
|
||||||
// opportunities, and the disadvantage of having the responsibility
|
// opportunities, and the disadvantage of having the responsibility
|
||||||
// to preserve dominator information.
|
// to preserve dominator information.
|
||||||
if (ExitBlocks.size() > 1 && L->getUniqueExitBlock()) {
|
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) {
|
||||||
SmallVector<BasicBlock*, 8> ExitingBlocks;
|
SmallVector<BasicBlock*, 8> ExitingBlocks;
|
||||||
L->getExitingBlocks(ExitingBlocks);
|
L->getExitingBlocks(ExitingBlocks);
|
||||||
for (unsigned i = 0, e = ExitingBlocks.size(); i != e; ++i) {
|
for (unsigned i = 0, e = ExitingBlocks.size(); i != e; ++i) {
|
||||||
|
Reference in New Issue
Block a user