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 support for global allocation in smir #118012

Merged
merged 3 commits into from
Nov 22, 2023
Merged

Conversation

celinval
Copy link
Contributor

@celinval celinval commented Nov 17, 2023

Add APIs to StableMir to support global allocation. Before this change, StableMir users had no API available to retrieve Allocation provenance information. They had to resource to internal APIs instead.

One example is retrieving the Allocation of an &str. See test for an example on how the API can be used.

@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@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

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2023

This PR changes Stable MIR

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

@petrochenkov
Copy link
Contributor

r? @petrochenkov

Why me of all people, I never even touched stable MIR!
r? compiler

@rustbot rustbot assigned b-naber and unassigned petrochenkov Nov 17, 2023
@petrochenkov
Copy link
Contributor

Reroll.
r? compiler

@rustbot rustbot assigned TaKO8Ki and unassigned b-naber Nov 17, 2023
@celinval
Copy link
Contributor Author

r? @petrochenkov

Why me of all people, I never even touched stable MIR! r? compiler

Sorry @petrochenkov, that was automatic assignment. I've created a PR to automatically assign stable mir PRs to one of the project members.

@celinval
Copy link
Contributor Author

r? @spastorino

@rustbot rustbot assigned spastorino and unassigned TaKO8Ki Nov 17, 2023
@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

could you please explain the current necessity for supporting this feature, and the contexts in which it will be utilized

@compiler-errors
Copy link
Member

Yeah, I agree with @ouz-a and think this PR should be more motivated. Maybe fill out the PR description a bit more?

@celinval
Copy link
Contributor Author

@compiler-errors @ouz-a, I added a basic test and edited the PR's description. Let me know if that makes more sense. Thanks

@bors
Copy link
Contributor

bors commented Nov 21, 2023

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

@ouz-a
Copy link
Contributor

ouz-a commented Nov 21, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 21, 2023

📌 Commit 0e32d56 has been approved by ouz-a

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 21, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 21, 2023
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#117972 (Add VarDebugInfo to Stable MIR)
 - rust-lang#118110 (Document `DefiningAnchor` a bit more)
 - rust-lang#118112 (Don't ICE when ambiguity is found when selecting `Index` implementation in typeck)
 - rust-lang#118135 (Remove quotation from filename in stable_mir)

Failed merges:

 - rust-lang#118012 (Add support for global allocation in smir)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#117972 (Add VarDebugInfo to Stable MIR)
 - rust-lang#118109 (rustdoc-search: simplify `checkPath` and `sortResults`)
 - rust-lang#118110 (Document `DefiningAnchor` a bit more)
 - rust-lang#118112 (Don't ICE when ambiguity is found when selecting `Index` implementation in typeck)
 - rust-lang#118135 (Remove quotation from filename in stable_mir)

Failed merges:

 - rust-lang#118012 (Add support for global allocation in smir)

r? `@ghost`
`@rustbot` modify labels: rollup
@celinval
Copy link
Contributor Author

@bors r=@ouz-a

@bors
Copy link
Contributor

bors commented Nov 22, 2023

📌 Commit c07a6d5 has been approved by ouz-a

It is now in the queue for this repository.

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2023
…mpiler-errors

Rollup of 6 pull requests

Successful merges:

 - rust-lang#118012 (Add support for global allocation in smir)
 - rust-lang#118013 (Enable Rust to use the EHCont security feature of Windows)
 - rust-lang#118100 (Enable profiler in dist-powerpc64-linux)
 - rust-lang#118142 (Tighten up link attributes for llvm-wrapper bindings)
 - rust-lang#118147 (Fix some unnecessary casts)
 - rust-lang#118161 (Allow defining opaques in `check_coroutine_obligations`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d58ded9 into rust-lang:master Nov 22, 2023
11 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 22, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2023
Rollup merge of rust-lang#118012 - celinval:smir-alloc, r=ouz-a

Add support for global allocation in smir

Add APIs to StableMir to support global allocation. Before this change, StableMir users had no API available to retrieve Allocation provenance information. They had to resource to internal APIs instead.

One example is retrieving the Allocation of an `&str`. See test for an example on how the API can be used.
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