diff options
author | Devang Patel <dpatel@apple.com> | 2009-03-10 18:00:05 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-03-10 18:00:05 +0000 |
commit | 84fceff969fd697f1173497b4c3b90efa1a16c17 (patch) | |
tree | 1a216e44c3ab9ff542cd5d9e7aee7f4afc06ff3c /llvm | |
parent | 59e371ac96e89d0e3e4fab79bf3955456be6294c (diff) | |
download | bcm5719-llvm-84fceff969fd697f1173497b4c3b90efa1a16c17.tar.gz bcm5719-llvm-84fceff969fd697f1173497b4c3b90efa1a16c17.zip |
Ignore dbg info, while estimating size of jump through block.
llvm-svn: 66554
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 10b3104d6b6..264e4e0df44 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/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. |