-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove polymorphization #133883
Remove polymorphization #133883
Conversation
r? compiler-errors |
f70a014
to
2c6e802
Compare
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval Some changes occurred in compiler/rustc_codegen_gcc Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
r=me after it's green @bors rollup=never (since it likely has a net-positive perf result, but let's not block this PR on perf.) |
This comment has been minimized.
This comment has been minimized.
looks like you've got an unnecessary import for |
2c6e802
to
7337610
Compare
a879158
to
eb4a656
Compare
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
@compiler-errors I'm not 100% sure I rebased properly over the change in I also expanded my search a bit and found a few more mentions of polymorphization to delete. Can you take a look? |
lgtm, r=me |
@bors r=compiler-errors |
☔ The latest upstream changes (presumably #133089) made this pull request unmergeable. Please resolve the merge conflicts. |
eb4a656
to
711c8cc
Compare
@bors r=compiler-errors |
☀️ Test successful - checks-actions |
Finished benchmarking commit (ca13e91): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.9%, secondary -0.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -2.0%, secondary -3.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 768.721s -> 769.879s (0.15%) |
Massively positive results, regressions are small and in stress tests only, marking as triaged. @rustbot label: +perf-regression-triaged |
Is it possible to briefly summarize the source of the performance improvements? I'm just curious. |
This PR deletes an often-called query and its associated table. I believe most of the improvement is caused by having less nodes in the query dep graph. Even though all those queries are effectively no-ops. (I would call this query overhead) |
Was it an oversight that the query was being called despite not doing anything useful? Or was it more complicated than that? |
The result of the unused_generic_params query was previously encoded in the crate metadata in case a crate that depends on the local crate uses |
I feel like the code perhaps couldve been written to not touch the polymorphization codepaths unless the feature was enabled, though not totally certain given polymorphization's interaction with codegen 🤔 not certain if the unused parameters query couldve been pushed onto the crates that actually needed it (ie the ones build with Zpolymorphize) |
This PR removes the flag
-Zpolymorphize
and all the infrastructure in the compiler that exists only to support it, per rust-lang/compiler-team#810.