Skip to content
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

Use ptradd for vtable indexing #122320

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Use ptradd for vtable indexing #122320

merged 1 commit into from
Mar 11, 2024

Conversation

erikdesjardins
Copy link
Contributor

@erikdesjardins erikdesjardins commented Mar 11, 2024

Extension of #121665.

After this, the only remaining usages of GEP are this kinda janky Emscription EH code, which I'll change in a future PR, and array indexing / pointer offsets, where there isn't yet a canonical ptradd form. (Out of curiosity I tried converting the latter to ptradd(ptr, mul(size, index)), but that causes codegen regressions right now.)

r? @nikic

Like field offsets, these are always constant.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 11, 2024
@saethlin
Copy link
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 11, 2024
@bors
Copy link
Contributor

bors commented Mar 11, 2024

⌛ Trying commit a7cd803 with merge 6b7c145...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 2024
Use ptradd for vtable indexing

Extension of rust-lang#121665.

After this, the only remaining usages of GEP are [this](https://github.com/rust-lang/rust/blob/cd81f5b27ee00b49d413db50b5e6af871cebcf23/compiler/rustc_codegen_llvm/src/intrinsic.rs#L909-L920) kinda janky Emscription EH code, which I'll change in a future PR, and array indexing / pointer offsets, where there isn't yet a canonical `ptradd` form. (Out of curiosity I tried converting the latter to `ptradd(ptr, mul(size, index))`, but that causes codegen regressions right now.)

r? `@nikic`
@bors
Copy link
Contributor

bors commented Mar 11, 2024

☀️ Try build successful - checks-actions
Build commit: 6b7c145 (6b7c1456c1196015cca5f855d45c723dbf733027)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6b7c145): comparison URL.

Overall result: no relevant changes - no action needed

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
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

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.

mean range count
Regressions ❌
(primary)
2.9% [1.4%, 4.8%] 13
Regressions ❌
(secondary)
3.1% [0.8%, 4.8%] 39
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.6% [-2.5%, 4.8%] 14

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 647.708s -> 646.334s (-0.21%)
Artifact size: 309.95 MiB -> 309.92 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 11, 2024
@nikic
Copy link
Contributor

nikic commented Mar 11, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Mar 11, 2024

📌 Commit a7cd803 has been approved by nikic

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2024
@klensy
Copy link
Contributor

klensy commented Mar 11, 2024

Looking at maxrss, this is clear regression, no?

@nikic
Copy link
Contributor

nikic commented Mar 11, 2024

I think the max-rss changes are noise.

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 2024
…kingjubilee

Rollup of 15 pull requests

Successful merges:

 - rust-lang#116791 (Allow codegen backends to opt-out of parallel codegen)
 - rust-lang#116793 (Allow targets to override default codegen backend)
 - rust-lang#117458 (LLVM Bitcode Linker: A self contained linker for nvptx and other targets)
 - rust-lang#119385 (Fix type resolution of associated const equality bounds (take 2))
 - rust-lang#121438 (std support for wasm32 panic=unwind)
 - rust-lang#121893 (Add tests (and a bit of cleanup) for interior mut handling in promotion and const-checking)
 - rust-lang#122080 (Clarity improvements to `DropTree`)
 - rust-lang#122152 (Improve diagnostics for parenthesized type arguments)
 - rust-lang#122166 (Remove the unused `field_remapping` field from `TypeLowering`)
 - rust-lang#122249 (interpret: do not call machine read hooks during validation)
 - rust-lang#122299 (Store backtrace for `must_produce_diag`)
 - rust-lang#122318 (Revision-related tweaks for next-solver tests)
 - rust-lang#122320 (Use ptradd for vtable indexing)
 - rust-lang#122328 (unix_sigpipe: Replace `inherit` with `sig_dfl` in syntax tests)
 - rust-lang#122330 (bootstrap readme: fix, improve, update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 028e260 into rust-lang:master Mar 11, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 2024
Rollup merge of rust-lang#122320 - erikdesjardins:vtable, r=nikic

Use ptradd for vtable indexing

Extension of rust-lang#121665.

After this, the only remaining usages of GEP are [this](https://github.com/rust-lang/rust/blob/cd81f5b27ee00b49d413db50b5e6af871cebcf23/compiler/rustc_codegen_llvm/src/intrinsic.rs#L909-L920) kinda janky Emscription EH code, which I'll change in a future PR, and array indexing / pointer offsets, where there isn't yet a canonical `ptradd` form. (Out of curiosity I tried converting the latter to `ptradd(ptr, mul(size, index))`, but that causes codegen regressions right now.)

r? `@nikic`
@mati865
Copy link
Contributor

mati865 commented Mar 11, 2024

#122338 rollup although rather big, shows no RSS regressions.

@erikdesjardins erikdesjardins deleted the vtable branch March 11, 2024 22:10
@workingjubilee
Copy link
Member

...honestly not sure how this wound up selected for the rollup, given that the UI prevents you from clicking on rollup=never PRs.

@mati865
Copy link
Contributor

mati865 commented Mar 12, 2024

There was no rollup=never here.

@Kobzol
Copy link
Contributor

Kobzol commented Mar 12, 2024

It is set automatically when doing a perf. run (check #122320 (comment)).

@mati865
Copy link
Contributor

mati865 commented Mar 12, 2024

Oh, it was buried deep, and I always thought it was used only if there were noticeable regressions.

@klensy
Copy link
Contributor

klensy commented Mar 12, 2024

#122338 rollup although rather big, shows no RSS regressions.

It can be masked by improvements from other 14 prs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants