-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc_codegen_ssa: use project_index
, not project_field
, for array literals.
#98675
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
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 900309e with merge 3c75882df207e888735b29c93586041759b61c67... |
☀️ Try build successful - checks-actions |
Queued 3c75882df207e888735b29c93586041759b61c67 with parent 66c83ff, future comparison URL. |
Finished benchmarking commit (3c75882df207e888735b29c93586041759b61c67): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
cc @rust-lang/wg-llvm I don't know how well "struct GEP" on arrays works, or if other frontends even emit it, but it looks like moving from that to a normal array-oriented GEP is an improvement. (And presumably even with opaque pointers we would always want to craft LLVM GEPs for array accesses such that they express a "stride" and an "index" instead of just being a raw offset, even if that "stride" isn't necessarily a typed array element - at least as long as LLVM cares about any of these things) |
Sounds reasonable to me. @bors r+ |
📌 Commit 900309e has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (20dd693): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
See #98615 (comment) for some context.
In short, we were using
project_field
even for arraymir::Rvalue::Aggregate
s, which results in benchmarks likedeep-vector.rs
(and presumably also some real-world usecases?) being impacted by how we handle non-array aggregate fields.(This is a separate PR so that we can measure the perf effects in isolation)
r? @nikic