[llvm-commits] [llvm] r137866 - /llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp
Bill Wendling
isanbard at gmail.com
Wed Aug 17 14:04:05 PDT 2011
Author: void
Date: Wed Aug 17 16:04:05 2011
New Revision: 137866
URL: http://llvm.org/viewvc/llvm-project?rev=137866&view=rev
Log:
Assert that we aren't trying to split the critical edge of a landing pad. Doing
so requires more care than this generic algorithm should handle.
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=137866&r1=137865&r2=137866&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp Wed Aug 17 16:04:05 2011
@@ -176,6 +176,11 @@
BasicBlock *TIBB = TI->getParent();
BasicBlock *DestBB = TI->getSuccessor(SuccNum);
+ // Splitting the critical edge to a landing pad block is non-trivial. Don't do
+ // it in this generic function.
+ assert(!DestBB->isLandingPad() &&
+ "Cannot split critical edge to a landing pad block!");
+
// Create a new basic block, linking it into the CFG.
BasicBlock *NewBB = BasicBlock::Create(TI->getContext(),
TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
More information about the llvm-commits
mailing list