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

Omit non-needs_drop drop_in_place in vtables #122662

Merged
merged 1 commit into from
May 28, 2024

Commits on May 27, 2024

  1. Omit non-needs_drop drop_in_place in vtables

    This replaces the drop_in_place reference with null in vtables. On
    librustc_driver.so, this drops about ~17k dynamic relocations from the
    output, since many vtables can now be placed in read-only memory, rather
    than having a relocated pointer included.
    
    This makes a tradeoff by adding a null check at vtable call sites.
    That's hard to avoid without changing the vtable format (e.g., to use a
    pc-relative relocation instead of an absolute address, and avoid the
    dynamic relocation that way). But it seems likely that the check is
    cheap at runtime.
    Mark-Simulacrum committed May 27, 2024
    Configuration menu
    Copy the full SHA
    4c002fc View commit details
    Browse the repository at this point in the history