rust/compiler/rustc_codegen_ssa/src
bors b8c207435c Auto merge of #119192 - michaelwoerister:mcp533-push, r=cjgillot
Replace a number of FxHashMaps/Sets with stable-iteration-order alternatives

This PR replaces almost all of the remaining `FxHashMap`s in query results with either `FxIndexMap` or `UnordMap`. The only case that is missing is the `EffectiveVisibilities` struct which turned out to not be straightforward to transform. Once that is done too, we can remove the `HashStable` implementation from `HashMap`.

The first commit adds the `StableCompare` trait which is a companion trait to `StableOrd`. Some types like `Symbol` can be compared in a cross-session stable way, but their `Ord` implementation is not stable. In such cases, a `StableCompare` implementation can be provided to offer a lightweight way for stable sorting. The more heavyweight option is to sort via `ToStableHashKey`, but then sorting needs to have access to a stable hashing context and `ToStableHashKey` can also be expensive as in the case of `Symbol` where it has to allocate a `String`.

The rest of the commits are rather mechanical and don't overlap, so they are best reviewed individually.

Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533).
2024-01-05 19:38:27 +00:00
..
back Auto merge of #119192 - michaelwoerister:mcp533-push, r=cjgillot 2024-01-05 19:38:27 +00:00
debuginfo Auto merge of #119258 - compiler-errors:closure-kind, r=eholk 2023-12-26 04:25:53 +00:00
mir Auto merge of #118991 - nikic:scalar-pair, r=nagisa 2024-01-05 14:31:56 +00:00
traits Auto merge of #118705 - WaffleLapkin:codegen-atomic-exhange-untuple, r=cjgillot 2023-12-30 07:42:19 +00:00
assert_module_sources.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
base.rs Remove more Session methods that duplicate DiagCtxt methods. 2023-12-24 08:17:47 +11:00
codegen_attrs.rs is_coroutine -> is_coroutine_or_closure 2023-12-30 15:24:15 +00:00
common.rs move ConstValue into mir 2023-09-19 11:11:02 +02:00
errors.rs Rename some Diagnostic setters. 2024-01-03 19:40:20 +11:00
lib.rs Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
meth.rs cg_ssa: remove pointee types and pointercast/bitcast-of-ptr 2023-07-29 13:18:20 -04:00
mono_item.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
size_of_val.rs fix computing the dynamic alignment of packed structs with dyn trait tails 2023-12-13 20:21:57 +01:00
target_features.rs Make iteration order of supported_target_features query stable 2024-01-04 13:48:57 +01:00