Skip to content

Commit 4aec7a5

Browse files
authored
JIT: fix regressions from inlining policy change (#117492)
Don't boost the IL size threshold at Tier1+Instr, since this can cause us to lose profile data for key inlinees. Fixes most of the regressions from #115904
1 parent ee419be commit 4aec7a5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/coreclr/jit/inlinepolicy.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,8 +1377,16 @@ void ExtendedDefaultPolicy::NoteInt(InlineObservation obs, int value)
13771377
}
13781378
else if (m_RootCompiler->fgHaveSufficientProfileWeights())
13791379
{
1380-
JITDUMP("Root has sufficient profile\n");
1381-
maxCodeSize = static_cast<unsigned>(JitConfig.JitExtDefaultPolicyMaxILRoot());
1380+
// For now we want to inline somewhat less aggressively in Tier1+Instr. We can reconsider
1381+
// when we have inlinee instrumentation. Otherwise we may lose profile data for key inlinees.
1382+
//
1383+
const bool isTier1Instr = m_RootCompiler->opts.IsInstrumentedAndOptimized();
1384+
JITDUMP("Root has sufficient profile%s\n",
1385+
isTier1Instr ? "; but we are not boosting max IL size for Tier1+Instr" : "");
1386+
if (!isTier1Instr)
1387+
{
1388+
maxCodeSize = static_cast<unsigned>(JitConfig.JitExtDefaultPolicyMaxILRoot());
1389+
}
13821390
}
13831391
else
13841392
{

0 commit comments

Comments
 (0)