Skip to content

Commit

Permalink
Merge pull request #21001 from mpirvu/inline-fanin-fix
Browse files Browse the repository at this point in the history
Adjust inliner use of profiled fanin data
  • Loading branch information
vijaysun-omr authored Jan 27, 2025
2 parents 7cf1352 + c58b321 commit 24f5138
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions runtime/compiler/optimizer/InlinerTempForJ9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4722,13 +4722,22 @@ bool TR_MultipleCallTargetInliner::isLargeCompiledMethod(TR_ResolvedMethod *call
veryLargeCompiledMethodFaninThreshold = 0;
}
}

uint32_t numCallers = 0, totalWeight = 0;
((TR_ResolvedJ9Method *) calleeResolvedMethod)->getFaninInfo(&numCallers, &totalWeight);
if ((numCallers > veryLargeCompiledMethodFaninThreshold) &&
(bytecodeSize > veryLargeCompiledMethodThreshold))
// Prevent inlining of "large" methods with "many" callers
if (bytecodeSize > veryLargeCompiledMethodThreshold)
{
return true;
uint32_t numCallers = 0, totalWeight = 0;
if (!comp()->getOption(TR_DisableInlinerFanIn))
((TR_ResolvedJ9Method *) calleeResolvedMethod)->getFaninInfo(&numCallers, &totalWeight);
if (numCallers == 0) // no fanin info
{
// If there is no fanin info, prevent inlining just based on method size
return true;
}
else
{
if (numCallers > veryLargeCompiledMethodFaninThreshold)
return true;
}
}
}
}
Expand Down

0 comments on commit 24f5138

Please sign in to comment.