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

Every Body should remember its MirSource #77427

Closed
ecstatic-morse opened this issue Oct 1, 2020 · 0 comments · Fixed by #77430
Closed

Every Body should remember its MirSource #77427

ecstatic-morse opened this issue Oct 1, 2020 · 0 comments · Fixed by #77430
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ecstatic-morse
Copy link
Contributor

ecstatic-morse commented Oct 1, 2020

We have a type called MirSource that is needed for debug logging during the MIR transform pipeline. We always know the source when building a Body, but for some reason we drop it on the floor. It then gets recomputed in rustc_mir and passed around as a separate parameter. This is unergonomic and increases function signature complexity. We should store a MirSource as part of the Body instead.

cc @rust-lang/wg-mir-opt

@ecstatic-morse ecstatic-morse added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html labels Oct 1, 2020
@ecstatic-morse ecstatic-morse changed the title Store a MirSource on every Body Every Body should remember its MirSource Oct 1, 2020
@ecstatic-morse ecstatic-morse added the E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. label Oct 1, 2020
@bors bors closed this as completed in 4ccf5f7 Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant