-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove the unused StableSet and StableMap types from rustc_data_structures. #99058
Remove the unused StableSet and StableMap types from rustc_data_structures. #99058
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
f3d4f42
to
2d2ac32
Compare
See #94188 for some prior work in this direction. I'll probably create an MCP for removing the |
#98890 was not caused by a |
In the MCP write-up I'll explain in more detail how I think things fit together. But in short, I think it's preferable to just not implement
I think the solution is a combination of both. If we disallow types in query results that don't have a proper |
@bors r+ |
…and-map, r=nagisa Remove the unused StableSet and StableMap types from rustc_data_structures. The current implementation is not "stable" in the same sense that `HashStable` and `StableHasher` are stable, i.e. across compilation sessions. So, in my opinion, it's better to remove those types (which are basically unused anyway) than to give the wrong impression that these are safe for incr. comp. I plan to provide new "stable" collection types soon that can be used to replace `FxHashMap` and `FxHashSet` in query results (see [draft](michaelwoerister@69d03ac)). It's unsound that `HashMap` and `HashSet` implement `HashStable` (see rust-lang#98890 for a recent P-critical bug caused by this) -- so we should make some progress there.
failed in rollup ci |
@bors r- |
☔ The latest upstream changes (presumably #99451) made this pull request unmergeable. Please resolve the merge conflicts. |
2d2ac32
to
7134a56
Compare
This comment has been minimized.
This comment has been minimized.
7134a56
to
88f6c6d
Compare
Rebased. Don't include this in rollups since it can easily break if another PR adds a @bors r=nagisa rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (be9cfb3): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Regression is still failing. Related changes: - rust-lang/rust#99420 - rust-lang/rust#99495 - rust-lang/rust#99844 - rust-lang/rust#99058
Regression is still failing. Related changes: - rust-lang/rust#99420 - rust-lang/rust#99495 - rust-lang/rust#99844 - rust-lang/rust#99058
* Fix compilation errors Regression is still failing. Related changes: - rust-lang/rust#99420 - rust-lang/rust#99495 - rust-lang/rust#99844 - rust-lang/rust#99058 * Change test to expect compilation failure The compiler has reverted their fix to Opaque types due to performance degradation. * Fix VTable handling now that it has an Opaque type - Add an implementation for vtable_size and vtable_align intrinsics. - Change how we handled Foreign types. Even though they are unsized, a pointer to foreign types is a thin pointer. Co-authored-by: Daniel Schwartz-Narbonne <danielsn@users.noreply.github.com>
The current implementation is not "stable" in the same sense that
HashStable
andStableHasher
are stable, i.e. across compilation sessions. So, in my opinion, it's better to remove those types (which are basically unused anyway) than to give the wrong impression that these are safe for incr. comp.I plan to provide new "stable" collection types soon that can be used to replace
FxHashMap
andFxHashSet
in query results (see draft). It's unsound thatHashMap
andHashSet
implementHashStable
(see #98890 for a recent P-critical bug caused by this) -- so we should make some progress there.