[llvm-commits] [llvm] r66841 - /llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp
Bill Wendling
isanbard at gmail.com
Thu Mar 12 16:22:59 PDT 2009
Author: void
Date: Thu Mar 12 18:22:59 2009
New Revision: 66841
URL: http://llvm.org/viewvc/llvm-project?rev=66841&view=rev
Log:
--- Merging (from foreign repository) r66840 into '.':
U lib/Transforms/Utils/SimplifyCFG.cpp
Previous debug info fix to this code wasn't quite
right; did the wrong thing when there are exactly 11
non-debug instructions, followed by debug info.
Remove a FIXME since it's apparently been fixed along the way.
Modified:
llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp?rev=66841&r1=66840&r2=66841&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp Thu Mar 12 18:22:59 2009
@@ -1094,14 +1094,13 @@
BranchInst *BI = cast<BranchInst>(BB->getTerminator());
unsigned Size = 0;
- // If this basic block contains anything other than a PHI (which controls the
- // branch) and branch itself, bail out. FIXME: improve this in the future.
for (BasicBlock::iterator BBI = BB->begin(); &*BBI != BI; ++BBI) {
+ if (isa<DbgInfoIntrinsic>(BBI))
+ continue;
if (Size > 10) return false; // Don't clone large BB's.
- if (!isa<DbgInfoIntrinsic>(BBI))
- ++Size;
+ ++Size;
- // We can only support instructions that are do not define values that are
+ // We can only support instructions that do not define values that are
// live outside of the current basic block.
for (Value::use_iterator UI = BBI->use_begin(), E = BBI->use_end();
UI != E; ++UI) {
More information about the llvm-commits
mailing list