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

rustc_mir_transform cleanups, round 2 #129929

Merged
merged 10 commits into from
Sep 9, 2024

Commits on Sep 8, 2024

  1. Reduce visibilities, and add warn(unreachable_pub).

    Lots of unnecessary `pub`s in this crate. Most are downgraded to
    `pub(super)`, though some don't need any visibility.
    nnethercote committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    6af470e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd9fd27 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Streamline AbortUnwindingCalls.

    Currently it constructs two vectors `calls_to_terminated` and
    `cleanups_to_remove` in the main loop, and then processes them after the
    main loop. But the processing can be done in the main loop, avoiding the
    need for the vectors.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    ec6fe4e View commit details
    Browse the repository at this point in the history
  2. Simplify verify_candidate_branch.

    Let chains are perfect for this kind of function.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    cc09ab3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    181fbd5 View commit details
    Browse the repository at this point in the history
  4. Remove an unnecessary continue.

    Nothing comes after it within the loop.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    4f2588f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9cf90b9 View commit details
    Browse the repository at this point in the history
  6. Make CallSite non-Copy.

    It doesn't need to be, and it's 72 bytes on 64-bit platforms, which is
    fairly large.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    7adde3f View commit details
    Browse the repository at this point in the history
  7. Use LocalDecls in a couple of places.

    It's nicer than the `IndexVec` type.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    751c8b4 View commit details
    Browse the repository at this point in the history
  8. Improve consistency in LowerIntrinsics.

    In some cases `target` and `arg` are obtained fallibly, and in some
    cases they are obtained infallibly. This commit changes them all to
    infallible.
    nnethercote committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    5445953 View commit details
    Browse the repository at this point in the history