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

SMIR: Expose Tables to users #116999

Closed
wants to merge 4 commits into from
Closed

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Oct 20, 2023

follow up to #116837

This is needed so that kani can convert the results of their SMIR analysis back to rustc data types (so they can incrementally introduce SMIR)

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 Oct 20, 2023
@rustbot
Copy link
Collaborator

rustbot commented Oct 20, 2023

This PR changes Stable MIR

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

This PR changes Stable MIR

cc @oli-obk, @celinval, @spastorino

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@bors
Copy link
Contributor

bors commented Oct 21, 2023

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

@celinval
Copy link
Contributor

celinval commented Oct 21, 2023

Maybe I misunderstood you, I thought the idea was to keep another thread local so we wouldn't have to carry the Tables object around.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 24, 2023
Add method to convert internal to stable constructs

This is an alternative implementation to rust-lang#116999. I believe we can still improve the logic a bit here, but I wanted to see which direction we should go first.

In this implementation, the API is simpler and we keep Tables somewhat private. The definition is still public though, since we have to expose the Stable trait. However, there's a cost of keeping another thread-local and using `Rc`, but I'm hoping it will be a small cost.

r? `@oli-obk`
r? `@spastorino`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 24, 2023
Add method to convert internal to stable constructs

This is an alternative implementation to rust-lang#116999. I believe we can still improve the logic a bit here, but I wanted to see which direction we should go first.

In this implementation, the API is simpler and we keep Tables somewhat private. The definition is still public though, since we have to expose the Stable trait. However, there's a cost of keeping another thread-local and using `Rc`, but I'm hoping it will be a small cost.

r? ``@oli-obk``
r? ``@spastorino``
@spastorino
Copy link
Member

Looks good to me but unsure if you want to apply @celinval suggestion or this also needs a rebase. Feel free to r=me after that.

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 24, 2023
Rollup merge of rust-lang#117010 - celinval:smir-internal, r=oli-obk

Add method to convert internal to stable constructs

This is an alternative implementation to rust-lang#116999. I believe we can still improve the logic a bit here, but I wanted to see which direction we should go first.

In this implementation, the API is simpler and we keep Tables somewhat private. The definition is still public though, since we have to expose the Stable trait. However, there's a cost of keeping another thread-local and using `Rc`, but I'm hoping it will be a small cost.

r? ``@oli-obk``
r? ``@spastorino``
@oli-obk
Copy link
Contributor Author

oli-obk commented Oct 25, 2023

This is obsolete now that we have #117010

@oli-obk oli-obk closed this Oct 25, 2023
@oli-obk oli-obk deleted the context_access branch October 25, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants