You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop tracking genReturnBB after global morph (dotnet#97130)
* Stop tracking `genReturnBB` after global morph
The `genReturnBB` pointer is set if a merged return block is created
during `fgAddInternal` (so, quite early during compilation). It needs
to be maintained (and the unreferenced block it points to needs to be
kept around) until global morph, which hooks up flow to this block.
After global morph, clear the pointer and don't maintain it; it is no
longer needed. Later code that was checking for it can instead check
for `BBJ_RETURN` blocks or `GT_RETURN` nodes. Also, remove the marking
of the `genReturnBB` block as `BBF_DONT_REMOVE`.
This leads to diffs, as unreachable return blocks get deleted. This can
happen, say, if all other exits are tail calls. If that happens and we're
in a case of needing a profiler hook, then the profile exit hook is also
not needed (it would be unreachable).
* Allow x86 synchronized methods to have unreachable return blocks
The JIT still needs to report an end-of-synchronized-range offset
in the GC info for x86 synchronized methods, so just create a new
label at the end of all blocks. The VM will automatically exit
the synchronization on an exceptional method exit.
* Create final IG before clearing GC info
0 commit comments