diff options
| author | bors <bors@rust-lang.org> | 2024-05-28 16:04:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-28 16:04:14 +0000 |
| commit | 8c4db851a7bb64173832e6602638204ebbd373a8 (patch) | |
| tree | 025d3db28def671bf3b334317ed744a434c20cbd /compiler/rustc_builtin_macros/src | |
| parent | 7717a306b2678ba9ece19b723c76a6b3a89ba931 (diff) | |
| parent | 4c002fce9d8421096538273c9b78db7d68529b94 (diff) | |
| download | rust-8c4db851a7bb64173832e6602638204ebbd373a8.tar.gz rust-8c4db851a7bb64173832e6602638204ebbd373a8.zip | |
Auto merge of #122662 - Mark-Simulacrum:optional-drop, r=bjorn3
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 (11%) 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. I'm not sure that's readily avoidable without changing the vtable format (e.g., so that we can 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. Accepted MCP: https://github.com/rust-lang/compiler-team/issues/730
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
0 files changed, 0 insertions, 0 deletions
