Skip to content

Commit 3842dc1

Browse files
committed
Fix inliner size scaling based on number of calls
When scaling the estimated size of a candidate for inlining based on frequency and the number of estimated calls nested in the candidate, the calculation inadvertantly ignores the number of estimated calls and uses a value derived from the frequency twice. This doesn't appear to be the intention of the code at all. Signed-off-by: Younes Manton <ymanton@ca.ibm.com>
1 parent 163a5c0 commit 3842dc1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/compiler/optimizer/InlinerTempForJ9.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4155,7 +4155,7 @@ int32_t TR_MultipleCallTargetInliner::scaleBasedOnFrequency(TR_CallTarget *callt
41554155

41564156
float avgMethodSize = (float)size / (float)ecs->getNumOfEstimatedCalls();
41574157
float numCallsFactor = (float)(avgMethodSize) / 110.0f;
4158-
numCallsFactor = std::max(factor, 0.1f);
4158+
numCallsFactor = std::max(numCallsFactor, 0.1f);
41594159

41604160
if (size > 100) {
41614161
size = (int)((float)size * factor * numCallsFactor);

0 commit comments

Comments
 (0)