Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
8607a41 to
2a3bb0a
Compare
So |
I think this case is even less likely than I originally assumed, because And as for which spelling gets to be "the accepted one", I'd go with the one users are more likely to write. The GUID is computed from the marker-stripped name, so the plain spelling is what actually matches, since this seems to be a limitation of LLVM's GUID design. Do you have a better idea? |
|
Oh, it seems #165458 has been reverted:< in that case, this PR should probably also be reconsidered. |
|
It's reverted for perf reasons, but I think the perf problems can be solved. We'll re-land it but that might take a couple of days. |
|
☔ The latest upstream changes (presumably #165856) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
…-v2, r=folkertdev fix MSVC calling convention byte counts performance fixed version of rust-lang#165458 original fix _reverted_ in rust-lang#165856 due to perf issues. fixes rust-lang#165299 companion test pr: rust-lang#165771 the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling. perf: local rustc-perf benchmarks on aarch64 (instructions:u): original fix: +0.83% optimized fix: ~0.00% testing: fastcall, stdcall and vectorcall codegen tests i686/x86_64 msvc linking with and without thinlto, verified dll exports lto smoke tests also handles `\x01`-prefixed symbols under thinlto (related: rust-lang#165790). r? @folkertdev
…-v2, r=folkertdev fix MSVC calling convention byte counts performance fixed version of rust-lang#165458 original fix _reverted_ in rust-lang#165856 due to perf issues. fixes rust-lang#165299 companion test pr: rust-lang#165771 the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling. perf: local rustc-perf benchmarks on aarch64 (instructions:u): original fix: +0.83% optimized fix: ~0.00% testing: fastcall, stdcall and vectorcall codegen tests i686/x86_64 msvc linking with and without thinlto, verified dll exports lto smoke tests also handles `\x01`-prefixed symbols under thinlto (related: rust-lang#165790). r? @folkertdev
Rollup merge of #165881 - paradoxicalguy:fix-msvc-byte-count-v2, r=folkertdev fix MSVC calling convention byte counts performance fixed version of #165458 original fix _reverted_ in #165856 due to perf issues. fixes #165299 companion test pr: #165771 the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling. perf: local rustc-perf benchmarks on aarch64 (instructions:u): original fix: +0.83% optimized fix: ~0.00% testing: fastcall, stdcall and vectorcall codegen tests i686/x86_64 msvc linking with and without thinlto, verified dll exports lto smoke tests also handles `\x01`-prefixed symbols under thinlto (related: #165790). r? @folkertdev
|
Since #165881 has been merged, I will close this PR:) |
…lkertdev fix MSVC calling convention byte counts performance fixed version of rust-lang/rust#165458 original fix _reverted_ in rust-lang/rust#165856 due to perf issues. fixes rust-lang/rust#165299 companion test pr: rust-lang/rust#165771 the regression came from unnecessary `fn_abi_of_instance` queries on targets that don't need symbol decoration. this now skips those queries while keeping non-windows `vectorcall` handling. perf: local rustc-perf benchmarks on aarch64 (instructions:u): original fix: +0.83% optimized fix: ~0.00% testing: fastcall, stdcall and vectorcall codegen tests i686/x86_64 msvc linking with and without thinlto, verified dll exports lto smoke tests also handles `\x01`-prefixed symbols under thinlto (related: rust-lang/rust#165790). r? @folkertdev
Now that #165458 has landed, the LTO preserve list can carry both the undecorated and the decorated spelling of an exported symbol.
However, one case is still missed: names that already start with
\x01. The preserve list is hashed as written, but ThinLTO summary GUIDs are computed from the name with that marker stripped, so these symbols are never seeded as live roots, get internalized by the thin link, and disappear from optimized builds that use local ThinLTO (for example an-Ostaticlib).This PR extends
symbol_names_for_ltoto emit both spellings for such names as well, and a run-make test is added.Example:
Output:
LLM disclosure: The code and text are written by hand.
r? @folkertdev