projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9748479
)
Use precomputed BB size instead of BB->size().
author
Nick Lewycky
<nicholas@mxc.ca>
Wed, 25 Jan 2012 18:54:13 +0000
(18:54 +0000)
committer
Nick Lewycky
<nicholas@mxc.ca>
Wed, 25 Jan 2012 18:54:13 +0000
(18:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148964
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/InlineCost.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/InlineCost.cpp
b/lib/Analysis/InlineCost.cpp
index 94b14be5e2da1fd23bc3a1d9a2d9f625363f4c9c..b326ba76893ecc5bcae3b782f03f0db6b0f44a93 100644
(file)
--- a/
lib/Analysis/InlineCost.cpp
+++ b/
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());