JIT: prefer edge counts; keep class profiles even if tossing counts (#85406)
authorAndy Ayers <andya@microsoft.com>
Thu, 27 Apr 2023 01:05:59 +0000 (18:05 -0700)
committerGitHub <noreply@github.com>
Thu, 27 Apr 2023 01:05:59 +0000 (18:05 -0700)
commite029183d484dabf02c87140415a1632a101b4647
treef8295c3148b1bfffd3c6cb335d7204cec25def0a
parent86c71e4a9b2742802541afb087a9f6541b27bb4a
JIT: prefer edge counts; keep class profiles even if tossing counts (#85406)

If there are both edge and block counts for a method, prefer to use the
edge counts (block counts are no longer the default, so are more likely
to be stale).

Sometimes we decide not to use count data because of correlation or
solver issues. When this happens, keep the class profile data viable
and let the code that deals with class profiles handle the possibility
of stale or mismatched data.

Addresses some aspects of #84446, though it's still not clear why we see
static profiles with both block and edge counts.
src/coreclr/jit/fgprofile.cpp