-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Deduplicate some code and compile-time values around vtables #55016
The head ref may contain hidden characters: "vtables\u{1F4A5}_vtables_everywhere"
Conversation
@bors try |
⌛ Trying commit ca8c9576ad36b9556102818a978182ef9413c53f with merge aaaada8d4890723455ce6f8fcb02f4af269ff2d5... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ups, ordering issues @bors try |
Deduplicate some code and compile-time values around vtables r? @RalfJung
☀️ Test successful - status-travis |
@rust-timer build fce7dc2 |
Insufficient permissions to issue commands to rust-timer. |
@rust-timer build fce7dc2 Bot should now recognize @oli-obk . |
Bors try commit fce7dc2 unexpectedly has 1 parents. |
@rust-timer build 178f3ba |
Success: Queued 178f3ba with parent e9e27e6, comparison URL. |
Finished benchmarking try commit 178f3ba |
https://perf.rust-lang.org/compare.html?start=e9e27e6a6258b3adf00a5dd35d2676656224880d&end=178f3ba362979973aef288e95b6730595586ce00&stat=max-rss undoes the memory regression introduced in #54461 (comment) but seems to regress load of others?! Ok I'm doing more in this PR than just undoing the regression, I'll split out the changes of this PR into separate PRs so we can observe them in isolation |
@bors try |
Deduplicate some code and compile-time values around vtables r? @RalfJung
@@ -50,6 +51,9 @@ pub struct EvalContext<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>> { | |||
|
|||
/// The virtual call stack. | |||
pub(crate) stack: Vec<Frame<'mir, 'tcx, M::PointerTag>>, | |||
|
|||
/// A cache for deduplicating vtables | |||
pub(super) vtables: FxHashMap<(Ty<'tcx>, ty::PolyTraitRef<'tcx>), AllocId>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit surprised to see this here and not in Memory
, but I guess it does not matter much.
@@ -207,6 +211,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc | |||
param_env, | |||
memory: Memory::new(tcx, memory_data), | |||
stack: Vec::new(), | |||
vtables: FxHashMap(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are supposed to use FxHashMap::default()
these days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
r=me with the nits fixed and perf happy. |
☀️ Test successful - status-travis |
@rust-timer build b4b95a3 |
Success: Queued b4b95a3 with parent c47785f, comparison URL. |
Finished benchmarking try commit b4b95a3 |
So my changes now are not causing perf regressions anymore (actually improving perf on some tests), but there are still some peak memory usage regressions. Most notably
There's also a big swath of small (1%) improvements |
@bors r+ |
📌 Commit b1d3111 has been approved by |
⌛ Testing commit b1d3111 with merge 3fd8be694dd129619f81b46944f5671e31359b8d... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Timeout, guessing spurious. @bors retry |
…, r=RalfJung Deduplicate some code and compile-time values around vtables r? @RalfJung
Rollup of 18 pull requests Successful merges: - #54646 (improve documentation on std::thread::sleep) - #54933 (Cleanup the rest of codegen_llvm) - #54964 (Run both lldb and gdb tests) - #55016 (Deduplicate some code and compile-time values around vtables) - #55031 (Improve verify_llvm_ir config option) - #55050 (doc std::fmt: the Python inspiration is already mentioned in precedin…) - #55077 (rustdoc: Use dyn keyword when rendering dynamic traits) - #55080 (Detect if access to localStorage is forbidden by the user's browser) - #55090 (regression test for move out of borrow via pattern) - #55102 (resolve: Do not skip extern prelude during speculative resolution) - #55104 (Add test for #34229) - #55111 ([Rustc Book] Explain --cfg's arguments) - #55122 (Cleanup mir/borrowck) - #55127 (Remove HybridBitSet::dummy) - #55128 (Fix LLVMRustInlineAsmVerify return type mismatch) - #55142 (miri: layout should not affect CTFE checks (outside of validation)) - #55151 (Cleanup nll) - #55161 ([librustdoc] Disable spellcheck for search field)
r? @RalfJung