Skip to content

GVN: Use a VnIndex in Address projection. #144477

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cjgillot
Copy link
Contributor

The current implementation of address projections is inconsistent. Indexing semantically relies on the index' value, but the implementation uses the index' place. This PR fixes that by using ProjectionElem<VnIndex, Ty<'tcx>> instead of the raw PlaceElem<'tcx>.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 26, 2025
@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jul 26, 2025

⌛ Trying commit 783ac7a with merge 413faf3

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Jul 26, 2025
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 26, 2025
@cjgillot cjgillot changed the title Gvn index GVN: Use a VnIndex in Address projection. Jul 26, 2025
@rust-bors
Copy link

rust-bors bot commented Jul 26, 2025

☀️ Try build successful (CI)
Build commit: 413faf3 (413faf3ee16ba890d3a82bfe8255e45c0aa5a4a5, parent: 430d6eddfc6a455ca4a0137c0822a982cccd3b2b)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (413faf3): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.0% [0.4%, 1.6%] 2
Regressions ❌
(secondary)
0.8% [0.0%, 1.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [0.4%, 1.6%] 2

Max RSS (memory usage)

Results (primary 0.1%, secondary -2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.1% [0.7%, 3.0%] 4
Regressions ❌
(secondary)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
-4.0% [-4.0%, -4.0%] 2
Improvements ✅
(secondary)
-3.5% [-4.6%, -2.2%] 3
All ❌✅ (primary) 0.1% [-4.0%, 3.0%] 6

Cycles

Results (primary -3.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.7% [-3.7%, -3.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.7% [-3.7%, -3.7%] 1

Binary size

Results (primary 0.0%, secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 7
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 2
Improvements ✅
(primary)
-0.1% [-0.2%, -0.0%] 2
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 3
All ❌✅ (primary) 0.0% [-0.2%, 0.2%] 9

Bootstrap: 468.925s -> 469.927s (0.21%)
Artifact size: 374.68 MiB -> 374.75 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

3 participants