rust/compiler/rustc_codegen_ssa/src/back
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
..
rpath Handle non-utf8 rpaths (fix FIXME) 2023-08-03 20:04:18 +02:00
archive.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
command.rs Reduce usage of Symbol in the linker code 2022-06-28 18:38:36 +00:00
link.rs Enable address sanitizer for MSVC targets using INFERASANLIBS linker flag 2024-01-03 10:00:15 -08:00
linker.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
lto.rs Merge new_metadata into codegen_allocator 2022-04-30 21:20:08 +02:00
metadata.rs Address comment 2023-12-18 09:41:36 +08:00
mod.rs Use the object crate for metadata reading 2021-05-07 18:48:58 +02:00
rpath.rs rustc_codegen_ssa: use try_canonicalize in rpath 2023-10-06 09:54:11 -04:00
symbol_export.rs Make iteration order of wasm_import_module_map query stable 2024-01-04 13:37:21 +01:00
write.rs Remove is_lint field from Level::Error. 2024-01-04 16:09:31 +11:00