File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
runtime/compiler/optimizer Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -4722,13 +4722,22 @@ bool TR_MultipleCallTargetInliner::isLargeCompiledMethod(TR_ResolvedMethod *call
4722
4722
veryLargeCompiledMethodFaninThreshold = 0 ;
4723
4723
}
4724
4724
}
4725
-
4726
- uint32_t numCallers = 0 , totalWeight = 0 ;
4727
- ((TR_ResolvedJ9Method *) calleeResolvedMethod)->getFaninInfo (&numCallers, &totalWeight);
4728
- if ((numCallers > veryLargeCompiledMethodFaninThreshold) &&
4729
- (bytecodeSize > veryLargeCompiledMethodThreshold))
4725
+ // Prevent inlining of "large" methods with "many" callers
4726
+ if (bytecodeSize > veryLargeCompiledMethodThreshold)
4730
4727
{
4731
- return true ;
4728
+ uint32_t numCallers = 0 , totalWeight = 0 ;
4729
+ if (!comp ()->getOption (TR_DisableInlinerFanIn))
4730
+ ((TR_ResolvedJ9Method *) calleeResolvedMethod)->getFaninInfo (&numCallers, &totalWeight);
4731
+ if (numCallers == 0 ) // no fanin info
4732
+ {
4733
+ // If there is no fanin info, prevent inlining just based on method size
4734
+ return true ;
4735
+ }
4736
+ else
4737
+ {
4738
+ if (numCallers > veryLargeCompiledMethodFaninThreshold)
4739
+ return true ;
4740
+ }
4732
4741
}
4733
4742
}
4734
4743
}
You can’t perform that action at this time.
0 commit comments