aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-03-10 18:00:05 +0000
committerDevang Patel <dpatel@apple.com>2009-03-10 18:00:05 +0000
commit9200c89968e52a590ee0b96092a0a589aa138a6f (patch)
tree2479aecccfd96ac5d1aeceedc3cca40837648e8b /lib/Transforms/Utils/SimplifyCFG.cpp
parent075630a158c065f70093f8628c5fc94e4ce805e2 (diff)
Ignore dbg info, while estimating size of jump through block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index 10b3104d6b..264e4e0df4 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1112,8 +1112,10 @@ static bool BlockIsSimpleEnoughToThreadThrough(BasicBlock *BB) {
// 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, ++Size) {
+ for (BasicBlock::iterator BBI = BB->begin(); &*BBI != BI; ++BBI) {
if (Size > 10) return false; // Don't clone large BB's.
+ if (!isa<DbgInfoIntrinsic>(BBI))
+ ++Size;
// We can only support instructions that are do not define values that are
// live outside of the current basic block.