[llvm-branch-commits] [llvm-branch] r71566 - /llvm/branches/Apple/Dib/lib/CodeGen/CodePlacementOpt.cpp
Bill Wendling
isanbard at gmail.com
Tue May 12 11:04:32 PDT 2009
Author: void
Date: Tue May 12 13:04:31 2009
New Revision: 71566
URL: http://llvm.org/viewvc/llvm-project?rev=71566&view=rev
Log:
Merge in r71536:
Fix pr4195: When iterating through predecessor blocks, break out of the loop
after finding the (unique) layout predecessor. Sometimes a block may be listed
more than once, and processing it more than once in this loop can lead to
inconsistent values for FtTBB/FtFBB, since the AnalyzeBranch method does not
clear these values. There's no point in continuing the loop regardless.
The testcase for this is reduced from the 2003-05-02-DependentPHI SingleSource
test.
Modified:
llvm/branches/Apple/Dib/lib/CodeGen/CodePlacementOpt.cpp
Modified: llvm/branches/Apple/Dib/lib/CodeGen/CodePlacementOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/CodePlacementOpt.cpp?rev=71566&r1=71565&r2=71566&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/CodePlacementOpt.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/CodePlacementOpt.cpp Tue May 12 13:04:31 2009
@@ -155,10 +155,10 @@
// A fallthrough.
FtMBB = PredMBB;
MachineLoop *PL = MLI->getLoopFor(PredMBB);
- if (PL && (PL == L || PL->getLoopDepth() >= L->getLoopDepth())) {
+ if (PL && (PL == L || PL->getLoopDepth() >= L->getLoopDepth()))
OkToMove = false;
- break;
- }
+
+ break;
}
}
More information about the llvm-branch-commits
mailing list