Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop tracking genReturnBB after global morph #97130

Merged

Commits on Jan 20, 2024

  1. 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).
    BruceForstall committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    9d244a7 View commit details
    Browse the repository at this point in the history
  2. 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.
    BruceForstall committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    d01f784 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fca4c50 View commit details
    Browse the repository at this point in the history