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

JIT: Factor reachability sets and base them on new DFS #96892

Merged
merged 1 commit into from
Jan 12, 2024

Commits on Jan 12, 2024

  1. JIT: Factor reachability sets and base them on new DFS

    - Introduce `BlockReachabilitySets` which encapsulates a data structure
      that can answer "A -> B" reachability queries in `O(1)`. It factors
      the old `fgComputeReachabilitySets` and `fgReachable`.
    - Base the new reachability sets on the new DFS instead of using the old
      DFS. Switch to postorder num indexing instead of bbNum based indexing.
    - Remove `BasicBlock::bbReach`; store the reachability sets within
      `BlockReachabilitySets` instead. This costs some extra memory in
      FullOpts if we end up computing it twice, but reduces memory in
      MinOpts.
    - We no longer propagate `BBF_GC_SAFE_POINT` during the reachability
      computation. The cycle-based GC safe point algorithm introduced in
      dotnet#95299 does not require this propagation.
    - Switch the dead block elimination in `fgComputeReachability` to use
      `fgDfsBlocksAndRemove`, which has more general handling of EH and does
      not require as much iteration to closure
    - Remove the compuation of "enter blocks". With recent work the
      reachability computation was the last remaining use.
    
    Minor diffs expected due to the more general dead block removal capacity
    of `fgDfsBlocksAndRemove`.
    jakobbotsch committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    a0556e2 View commit details
    Browse the repository at this point in the history