1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-11 10:18:21 +09:00

JIT: Skip moving BBJ_COND jump target if fallthrough target is equally likely (#105084)

This commit is contained in:
Aman Khalid 2024-07-18 21:51:04 +00:00 committed by GitHub
parent 7cdd2e90db
commit c70791346c
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -4536,6 +4536,13 @@ void Compiler::fgMoveHotJumps()
targetEdge = block->GetFalseEdge();
unlikelyEdge = block->GetTrueEdge();
}
// If we aren't sure which successor is hotter, and we already fall into one of them,
// do nothing
if ((unlikelyEdge->getLikelihood() == 0.5) && block->NextIs(unlikelyEdge->getDestinationBlock()))
{
continue;
}
}
else
{