diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2012-01-25 18:54:13 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2012-01-25 18:54:13 +0000 |
commit | 0e496cddf0c762447e9fee19c2e809610878ccfb (patch) | |
tree | 1ab2e37d7b32d137719ff25c255d7bed050ddedd /llvm/lib/Analysis/InlineCost.cpp | |
parent | 244953850033a9f9a01085a7cf1e3c83829f7b73 (diff) | |
download | bcm5719-llvm-0e496cddf0c762447e9fee19c2e809610878ccfb.tar.gz bcm5719-llvm-0e496cddf0c762447e9fee19c2e809610878ccfb.zip |
Use precomputed BB size instead of BB->size().
llvm-svn: 148964
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 2 |
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()); |