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

Codegen tweaks #103511

Merged
merged 5 commits into from
Oct 25, 2022
Merged

Codegen tweaks #103511

merged 5 commits into from
Oct 25, 2022

Commits on Oct 25, 2022

  1. rustc_codegen_ssa: use more consistent naming.

    Ensure:
    - builders always have a `bx` suffix;
    - backend basic blocks always have an `llbb` suffix,
    - paired builders and basic blocks have consistent prefixes.
    nnethercote committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    4e4092f View commit details
    Browse the repository at this point in the history
  2. Rename two TerminatorCodegenHelper methods.

    `TerminatorCodegenHelper` has three methods `llblock`, `llbb`, and
    `lltarget`. They're all similar, but the names given no indication of
    the differences.
    
    This commit renames `lltarget` as `llbb_with_landing_pad`, and `llblock`
    as `llbb_with_cleanup`. These aren't fantastic names, but at least it's
    now clear that `llbb` is the lowest-level of the three and the other two
    wrap it.
    nnethercote committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    a5bd5da View commit details
    Browse the repository at this point in the history
  3. Clarify some cleanup stuff.

    - Rearrange the match in `llbb_with_landing_pad` so the `(Some,Some)`
      cases are together.
    - Add assertions to indicate two MSVC-only paths.
    nnethercote committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    03f350f View commit details
    Browse the repository at this point in the history
  4. Inline and remove cast_shift_rhs.

    It has a single call site.
    nnethercote committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    8c02f4d View commit details
    Browse the repository at this point in the history
  5. Simplify cast_shift_expr_rhs.

    It's only ever used with shift operators.
    nnethercote committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    6cd35ac View commit details
    Browse the repository at this point in the history