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

Add place.ty() and Ty build from a kind to smir #118015

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

celinval
Copy link
Contributor

Add a method to retrieve the type of a place and a few utility functions needed to build the projection type. I decided to return a result to avoid panicking if the user passes invalid inputs, such as wrong list of locals.

r? @spastorino

@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 Nov 17, 2023
@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2023

This PR changes Stable MIR

cc @oli-obk, @celinval, @spastorino, @ouz-a

@bors
Copy link
Contributor

bors commented Nov 18, 2023

☔ The latest upstream changes (presumably #118023) made this pull request unmergeable. Please resolve the merge conflicts.

@ouz-a
Copy link
Contributor

ouz-a commented Nov 18, 2023

Thanks this is great, left few small nits.

ouz-a
ouz-a previously requested changes Nov 20, 2023
Copy link
Contributor

@ouz-a ouz-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nits

compiler/rustc_smir/src/rustc_smir/mod.rs Outdated Show resolved Hide resolved
compiler/stable_mir/src/mir/body.rs Outdated Show resolved Hide resolved
@compiler-errors
Copy link
Member

Needs a rebase, r=me after that, unless you want further review from ouz-a

@celinval
Copy link
Contributor Author

@ouz-a, I applied your suggestions. Is there any further changes you would like me to make?

@ouz-a
Copy link
Contributor

ouz-a commented Nov 20, 2023

@ouz-a, I applied your suggestions. Is there any further changes you would like me to make?

lgtm

@celinval celinval dismissed ouz-a’s stale review November 20, 2023 20:12

Based on the comment above...

 - Simplified DefTy::internal
 - Break down place::ty() method
@celinval
Copy link
Contributor Author

@bors r=@compiler-errors

@bors
Copy link
Contributor

bors commented Nov 20, 2023

📌 Commit d94df62 has been approved by compiler-errors

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 Nov 20, 2023
@bors
Copy link
Contributor

bors commented Nov 21, 2023

⌛ Testing commit d94df62 with merge 390e3c8...

@bors
Copy link
Contributor

bors commented Nov 21, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 390e3c8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 21, 2023
@bors bors merged commit 390e3c8 into rust-lang:master Nov 21, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 21, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (390e3c8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -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)
- - 0
Regressions ❌
(secondary)
3.7% [3.7%, 3.7%] 1
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.0% [-2.0%, -2.0%] 1

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: 674.861s -> 674.879s (0.00%)
Artifact size: 313.77 MiB -> 313.82 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

7 participants