Skip to content

Add support for global allocation in smir - #118012

Merged
bors merged 3 commits into
rust-lang:masterfrom
celinval:smir-alloc
Nov 22, 2023
Merged

Add support for global allocation in smir#118012
bors merged 3 commits into
rust-lang:masterfrom
celinval:smir-alloc

Conversation

@celinval

@celinvalcelinval commented Nov 17, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

r? @petrochenkov

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

@rustbotrustbot 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
Copy Markdown
Collaborator

This PR changes Stable MIR

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

@rust-log-analyzer

This comment has been minimized.

@rustbot

Copy link
Copy Markdown
Collaborator

This PR changes Stable MIR

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

@petrochenkov

Copy link
Copy Markdown
Contributor

r? @petrochenkov

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

@rustbotrustbot assigned b-naber and unassigned petrochenkovNov 17, 2023
@petrochenkov

Copy link
Copy Markdown
Contributor

Reroll.
r? compiler

@rustbotrustbot assigned TaKO8Ki and unassigned b-naberNov 17, 2023
@celinval

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

r? @spastorino

@rustbotrustbot assigned spastorino and unassigned TaKO8KiNov 17, 2023
@bors

bors commented Nov 18, 2023

Copy link
Copy Markdown
Collaborator

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

@ouz-a

Copy link
Copy Markdown
Contributor

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

Comment threadcompiler/rustc_smir/src/rustc_smir/mod.rs
@compiler-errors

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

@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

bors commented Nov 21, 2023

Copy link
Copy Markdown
Collaborator

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

@ouz-a

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Nov 21, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 0e32d56 has been approved by ouz-a

It is now in the queue for this repository.

@borsbors 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
This was referenced Nov 21, 2023
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
Copy Markdown
ContributorAuthor

@bors r=@ouz-a

@bors

bors commented Nov 22, 2023

Copy link
Copy Markdown
Collaborator

📌 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:masterNov 22, 2023
@rustbotrustbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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

@celinval@rustbot@rust-log-analyzer@petrochenkov@bors@ouz-a@compiler-errors@spastorino@TaKO8Ki@b-naber