[llvm-commits] [llvm] r72223 - in /llvm/trunk: lib/VMCore/Dominators.cpp test/Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll
Eli Friedman
eli.friedman at gmail.com
Thu May 21 13:40:43 PDT 2009
Author: efriedma
Date: Thu May 21 15:40:30 2009
New Revision: 72223
URL: http://llvm.org/viewvc/llvm-project?rev=72223&view=rev
Log:
Fix some incorrect logic in DominanceFrontier::splitBlock. Part of
PR4238.
Modified:
llvm/trunk/lib/VMCore/Dominators.cpp
llvm/trunk/test/Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll
Modified: llvm/trunk/lib/VMCore/Dominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Dominators.cpp?rev=72223&r1=72222&r2=72223&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Dominators.cpp (original)
+++ llvm/trunk/lib/VMCore/Dominators.cpp Thu May 21 15:40:30 2009
@@ -160,10 +160,7 @@
break;
}
}
-
- if (!BlockDominatesAny)
- continue;
-
+
// If NewBBSucc should not stay in our dominator frontier, remove it.
// We remove it unless there is a predecessor of NewBBSucc that we
// dominate, but we don't strictly dominate NewBBSucc.
@@ -181,7 +178,8 @@
if (ShouldRemove)
removeFromFrontier(DFI, NewBBSucc);
- addToFrontier(DFI, NewBB);
+ if (BlockDominatesAny && (&*FI == NewBB || !DT.dominates(FI, NewBB)))
+ addToFrontier(DFI, NewBB);
}
}
Modified: llvm/trunk/test/Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll?rev=72223&r1=72222&r2=72223&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll (original)
+++ llvm/trunk/test/Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll Thu May 21 15:40:30 2009
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | opt -scalarrepl -loopsimplify -licm -disable-output
+; RUN: llvm-as < %s | opt -scalarrepl -loopsimplify -licm -disable-output -verify-dom-info
define void @inflate() {
entry:
More information about the llvm-commits
mailing list