[llvm-commits] [llvm] r41051 - /llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp
Devang Patel
dpatel at apple.com
Mon Aug 13 14:59:19 PDT 2007
Author: dpatel
Date: Mon Aug 13 16:59:17 2007
New Revision: 41051
URL: http://llvm.org/viewvc/llvm-project?rev=41051&view=rev
Log:
If NewBB dominates DestBB then DestBB is not part of NewBB's dominance frontier.
Modified:
llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp
Modified: llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp?rev=41051&r1=41050&r2=41051&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp Mon Aug 13 16:59:17 2007
@@ -227,8 +227,12 @@
DominanceFrontier::DomSetType NewDFSet;
if (NewBBDominatesDestBB) {
DominanceFrontier::iterator I = DF->find(DestBB);
- if (I != DF->end())
+ if (I != DF->end()) {
DF->addBasicBlock(NewBB, I->second);
+ // However NewBB's frontier does not include DestBB.
+ DominanceFrontier::iterator NF = DF->find(NewBB);
+ DF->removeFromFrontier(NF, DestBB);
+ }
else
DF->addBasicBlock(NewBB, DominanceFrontier::DomSetType());
} else {
More information about the llvm-commits
mailing list