about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-07-20 09:52:26 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-07-20 09:58:13 +1000
commit8c31219d5c6fe11654060ab968285705f00b1ec8 (patch)
tree384cf362bc96cc6d41cb175d9f5e0923893683e4 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent0d6a9b2bf7f823ed563ca3a75392ba9bf9ff1566 (diff)
downloadrust-8c31219d5c6fe11654060ab968285705f00b1ec8.tar.gz
rust-8c31219d5c6fe11654060ab968285705f00b1ec8.zip
Tweak CGU sorting in a couple of places.
In `base.rs`, tweak how the CGU size interleaving works. Since #113777,
it's much more common to have multiple CGUs with identical sizes. With
the existing code these same-sized items ended up in the
opposite-to-desired order due to the stable sorting. The code now starts
with a reverse sort (like is done in `partitioning.rs`) which gives the
behaviour we want. This doesn't matter much for perf, but makes profiles
in `samply` look more like what we expect.

In `partitioning.rs`, we can use `sort_by_key` instead of
`sort_by_cached_key` because `CGU::size_estimate()` is cheap. (There is
an identical CGU sort earlier in that function that already uses
`sort_by_key`.)
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions