about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-09-05 18:55:32 +0000
committerbors <bors@rust-lang.org>2021-09-05 18:55:32 +0000
commite30b68353fe22b00f40d021e7914eeb78473b3c1 (patch)
treeb0c5e0a269e05fe4ad021b7770f1a2de0a0648db /compiler/rustc_mir_transform/src/coverage/mod.rs
parente2750baf53aaa60db95f10759f6cf9463dc5a6bd (diff)
parent97214eecc5a6c35c6cd8d9798207175cc2e15812 (diff)
downloadrust-e30b68353fe22b00f40d021e7914eeb78473b3c1.tar.gz
rust-e30b68353fe22b00f40d021e7914eeb78473b3c1.zip
Auto merge of #88552 - nbdd0121:vtable, r=nagisa
Stop allocating vtable entries for non-object-safe methods

Current a vtable entry is allocated for all associated fns, even if the method is not object-safe: https://godbolt.org/z/h7vx6f35T

As a result, each vtable for `Iterator`' currently consumes 74 `usize`s. This PR stops allocating vtable entries for those methods, reducing vtable size of each `Iterator` vtable to 7 `usize`s.

Note that this PR introduces will cause more invocations of `is_vtable_safe_method`. So a perf run might be needed. If result isn't favorable then we might need to query-ify `is_vtable_safe_method`.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions