summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 94b14be5e2d..b326ba76893 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -331,7 +331,7 @@ unsigned CodeMetrics::CountCodeReductionForAlloca(Value *V) {
if (BranchInst *BI = dyn_cast<BranchInst>(I)) {
BasicBlock *BB = BI->getSuccessor(Result ? 0 : 1);
if (BB->getSinglePredecessor())
- Reduction += InlineConstants::InstrCost * BB->size();
+ Reduction += InlineConstants::InstrCost * NumBBInsts[BB];
}
}
} while (!Worklist.empty());
OpenPOWER on IntegriCloud