Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: rust-lang/compiler-team#730
- Loading branch information