1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

Revert previous patch until I get a bug fixed

llvm-svn: 14853
This commit is contained in:
Chris Lattner 2004-07-15 05:36:31 +00:00
parent 525a4d1e7e
commit fde0e6bb95

View File

@ -147,9 +147,6 @@ bool LoopSimplify::ProcessLoop(Loop *L) {
Changed = true; Changed = true;
} }
DominatorSet &DS = getAnalysis<DominatorSet>(); // Update dominator info
// Next, check to make sure that all exit nodes of the loop only have // Next, check to make sure that all exit nodes of the loop only have
// predecessors that are inside of the loop. This check guarantees that the // predecessors that are inside of the loop. This check guarantees that the
// loop preheader/header will dominate the exit blocks. If the exit block has // loop preheader/header will dominate the exit blocks. If the exit block has
@ -158,7 +155,9 @@ bool LoopSimplify::ProcessLoop(Loop *L) {
L->getExitBlocks(ExitBlocks); L->getExitBlocks(ExitBlocks);
for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) { for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) {
BasicBlock *ExitBlock = ExitBlocks[i]; BasicBlock *ExitBlock = ExitBlocks[i];
if (!DS.dominates(L->getHeader(), ExitBlock)) { for (pred_iterator PI = pred_begin(ExitBlock), PE = pred_end(ExitBlock);
PI != PE; ++PI)
if (!L->contains(*PI)) {
BasicBlock *NewBB = RewriteLoopExitBlock(L, ExitBlock); BasicBlock *NewBB = RewriteLoopExitBlock(L, ExitBlock);
for (unsigned j = i; j != ExitBlocks.size(); ++j) for (unsigned j = i; j != ExitBlocks.size(); ++j)
if (ExitBlocks[j] == ExitBlock) if (ExitBlocks[j] == ExitBlock)
@ -166,6 +165,7 @@ bool LoopSimplify::ProcessLoop(Loop *L) {
NumInserted++; NumInserted++;
Changed = true; Changed = true;
break;
} }
} }