Skip to content

Commit

Permalink
Fix hot/cold splitting (dotnet#96074)
Browse files Browse the repository at this point in the history
Change dotnet#95836 removed a bit too much code, namely, a loop that set
`BBF_COLD` on newly determined cold blocks. Restore that loop.

Add some additional IG jump dumping.

Fixes dotnet#95946
  • Loading branch information
BruceForstall authored Dec 16, 2023
1 parent 2284495 commit b18db1b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/coreclr/jit/emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4297,19 +4297,34 @@ void emitter::emitDispJumpList()
printf(" -> %s", getRegName(jmp->idReg1()));
}
else
#endif // TARGET_ARM64
{
printf(" -> IG%02u", ((insGroup*)emitCodeGetCookie(jmp->idAddr()->iiaBBlabel))->igNum);
}
#else
printf(" -> IG%02u", ((insGroup*)emitCodeGetCookie(jmp->idAddr()->iiaBBlabel))->igNum);

if (jmp->idjShort)
{
printf(" (short)");
}

if (jmp->idjKeepLong)
{
printf(" (long)");
}

#if defined(TARGET_XARCH)
if (jmp->idjIsRemovableJmpCandidate)
{
printf(" ; removal candidate");
}
#endif // TARGET_XARCH
#endif // !TARGET_ARM64

#if defined(TARGET_AMD64)
if (jmp->idjIsAfterCallBeforeEpilog)
{
printf(" ; after call before epilog");
}
#endif // TARGET_AMD64
}
printf("\n");
jmpCount += 1;
Expand Down
5 changes: 5 additions & 0 deletions src/coreclr/jit/flowgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3279,6 +3279,11 @@ PhaseStatus Compiler::fgDetermineFirstColdBlock()
}
}

for (block = firstColdBlock; block != nullptr; block = block->Next())
{
block->SetFlags(BBF_COLD);
}

EXIT:;

#ifdef DEBUG
Expand Down

0 comments on commit b18db1b

Please sign in to comment.