[llvm-commits] [llvm] r124260 - /llvm/trunk/lib/Analysis/InlineCost.cpp
Eric Christopher
echristo at apple.com
Tue Jan 25 17:10:00 PST 2011
Author: echristo
Date: Tue Jan 25 19:09:59 2011
New Revision: 124260
URL: http://llvm.org/viewvc/llvm-project?rev=124260&view=rev
Log:
Coding style formatting changes.
Modified:
llvm/trunk/lib/Analysis/InlineCost.cpp
Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=124260&r1=124259&r2=124260&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Tue Jan 25 19:09:59 2011
@@ -343,12 +343,9 @@
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 @@
// 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);
}
More information about the llvm-commits
mailing list