[llvm-commits] [llvm] r53760 - /llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp
Owen Anderson
resistor at mac.com
Fri Jul 18 10:46:41 PDT 2008
Author: resistor
Date: Fri Jul 18 12:46:41 2008
New Revision: 53760
URL: http://llvm.org/viewvc/llvm-project?rev=53760&view=rev
Log:
Add some checks that got lost in the shuffle. This fixes 464.h264ref.
Modified:
llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp
Modified: llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp?rev=53760&r1=53759&r2=53760&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp Fri Jul 18 12:46:41 2008
@@ -39,6 +39,10 @@
// Can't merge if there are multiple predecessors.
if (!PredBB) return false;
+ // Don't break self-loops.
+ if (PredBB == BB) return false;
+ // Don't break invokes.
+ if (isa<InvokeInst>(PredBB->getTerminator())) return false;
succ_iterator SI(succ_begin(PredBB)), SE(succ_end(PredBB));
BasicBlock* OnlySucc = BB;
More information about the llvm-commits
mailing list