about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/write.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-06-16 15:17:01 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-06-22 08:10:29 +1000
commit6f228e3420787f123aff9b06247fefcb91a941ed (patch)
tree06fc39511483035046bad853343d4524f6738ce2 /compiler/rustc_codegen_llvm/src/back/write.rs
parentf6cadae163f3d5d29a12ec11c92aca90a8d742e4 (diff)
downloadrust-6f228e3420787f123aff9b06247fefcb91a941ed.tar.gz
rust-6f228e3420787f123aff9b06247fefcb91a941ed.zip
Inline before merging CGUs.
Because CGU merging relies on CGU sizes, but the CGU sizes before
inlining aren't accurate.

This requires tweaking how the sizes are updated during merging: if CGU
A and B both have an inlined function F, then `size(A + B)` will be a
little less than `size(A) + size(B)`, because `A + B` will only have one
copy of F. Also, the minimum CGU size is increased because it now has to
account for inlined functions.

This change doesn't have much effect on compile perf, but it makes
follow-on changes that involve more sophisticated reasoning about CGU
sizes much easier.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
0 files changed, 0 insertions, 0 deletions