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

Enable -Zshare-generics for inline(never) functions #123244

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Jun 8, 2024

  1. Enable -Zshare-generics for inline(never) functions

    This avoids inlining cross-crate generic items when possible that are
    already marked inline(never), implying that the author is not intending
    for the function to be inlined by callers. As such, having a local copy
    may make it easier for LLVM to optimize but mostly just adds to binary
    bloat and codegen time. In practice our benchmarks indicate this is
    indeed a win for larger compilations, where the extra cost in dynamic
    linking to these symbols is diminished compared to the advantages in
    fewer copies that need optimizing in each binary.
    
    It might also make sense it expand this with other heuristics (e.g.,
    `#[cold]`) in the future, but this seems like a good starting point.
    Mark-Simulacrum committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    19cbb71 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2024

  1. Fix fallout in tests

    Keeping in separate commit while we discuss it.
    Mark-Simulacrum committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    48ca45a View commit details
    Browse the repository at this point in the history
  2. WIP: un-inline(never) finish_grow

    This lets it get codegen'd downstream.
    Mark-Simulacrum committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    74af8ba View commit details
    Browse the repository at this point in the history
  3. Try avoiding MIR inlining, if any

    Co-authored-by: scottmcm <[email protected]>
    Mark-Simulacrum and scottmcm authored Jun 9, 2024
    Configuration menu
    Copy the full SHA
    a14d42e View commit details
    Browse the repository at this point in the history