summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-01-26 01:09:59 +0000
committerEric Christopher <echristo@apple.com>2011-01-26 01:09:59 +0000
commit58f157a6771add85b96f3c8c2894d2a9694eacfe (patch)
treeb805bb7d59bf2abe4946d99a6a3aa6ed58d29ec6 /llvm/lib/Analysis/InlineCost.cpp
parent74889b29a8a070b40d6584f6a4c95fa4fb196d27 (diff)
downloadbcm5719-llvm-58f157a6771add85b96f3c8c2894d2a9694eacfe.tar.gz
bcm5719-llvm-58f157a6771add85b96f3c8c2894d2a9694eacfe.zip
Coding style formatting changes.
llvm-svn: 124260
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 780f921fff4..76f13484029 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud