diff options
author | Eric Christopher <echristo@apple.com> | 2011-01-26 01:09:59 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-01-26 01:09:59 +0000 |
commit | 7d3a16f687d57688e0806f12929a195c5114dab3 (patch) | |
tree | d2512ab545668d1accc4f5ec490d78c336a5a525 /lib/Analysis/InlineCost.cpp | |
parent | 078628465b73348b5608ec6aa2d7181679543903 (diff) | |
download | external_llvm-7d3a16f687d57688e0806f12929a195c5114dab3.zip external_llvm-7d3a16f687d57688e0806f12929a195c5114dab3.tar.gz external_llvm-7d3a16f687d57688e0806f12929a195c5114dab3.tar.bz2 |
Coding style formatting changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124260 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InlineCost.cpp')
-rw-r--r-- | lib/Analysis/InlineCost.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index 780f921..76f1348 100644 --- a/lib/Analysis/InlineCost.cpp +++ b/lib/Analysis/InlineCost.cpp @@ -343,12 +343,9 @@ int InlineCostAnalyzer::getSpecializationBonus(Function *Callee, if (CalleeFI->Metrics.NumBlocks == 0) CalleeFI->analyzeFunction(Callee); - - for (unsigned i = 0, s = SpecializedArgNos.size(); - i < s; ++i ) - { + for (unsigned i = 0, s = SpecializedArgNos.size(); i < s; ++i ) Bonus += CalleeFI->ArgumentWeights[SpecializedArgNos[i]].ConstantBonus; - } + // Calls usually take a long time, so they make the specialization gain // smaller. Bonus -= CalleeFI->Metrics.NumCalls * InlineConstants::CallPenalty; @@ -514,9 +511,7 @@ InlineCost InlineCostAnalyzer::getSpecializationCost(Function *Callee, // away with the given arguments replaced by constants. for (SmallVectorImpl<unsigned>::iterator an = SpecializedArgNos.begin(), ae = SpecializedArgNos.end(); an != ae; ++an) - { Cost -= CalleeFI->ArgumentWeights[*an].ConstantWeight; - } return llvm::InlineCost::get(Cost); } |