diff options
author | Dale Johannesen <dalej@apple.com> | 2009-03-12 23:18:09 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-03-12 23:18:09 +0000 |
commit | ed6f5a8253bef4154fd387c5675ed8d4236f1a90 (patch) | |
tree | 4f93fce3cd04a8f49fba5a869d877107abff43a7 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | af76c34b4bc4f4e17b5f5b1a22ef4b95c0fd31b5 (diff) | |
download | bcm5719-llvm-ed6f5a8253bef4154fd387c5675ed8d4236f1a90.tar.gz bcm5719-llvm-ed6f5a8253bef4154fd387c5675ed8d4236f1a90.zip |
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.
llvm-svn: 66840
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 637fab0bf0e..b8bac6da2fe 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1122,14 +1122,13 @@ static bool BlockIsSimpleEnoughToThreadThrough(BasicBlock *BB) { 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) { |