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

Improve documentation of MIR queries & passes #1434

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

Jaic1
Copy link
Contributor

@Jaic1 Jaic1 commented Aug 16, 2022

This PR improve the documentation of MIR queries and passes.

Below is the summary of changes:

  • delete mir_validated
  • add mir_promoted and mir_drops_elaborated_and_const_checked
  • replace the NoLandingPads pass example with CleanupNonCodegenStatements
  • extend the stealing mechanism and give the dependency of MIR queries as an overview
  • add mdbook-mermaid in the build instructions

FIXME:

  • Does ty::queries::foo::force(...) still appear in rustc?

Since rust-lang/rust#99102 may significantly change the MIR queries (and thus its doc), we can wait for its result or send follow-up PRs. This is mostly documenting the code in rustc_mir_transform, so maybe cc @rust-lang/wg-mir-opt.

@JohnTitor JohnTitor added waiting-on-review This PR is waiting for a reviewer to verify its content blocked This PR is blocked waiting for some other PR and removed waiting-on-review This PR is waiting for a reviewer to verify its content labels Aug 17, 2022
src/mir/passes.md Outdated Show resolved Hide resolved
@tshepang
Copy link
Member

with rust-lang/rust#99102 now accepted, does this need to change

@JohnTitor JohnTitor added waiting-on-review This PR is waiting for a reviewer to verify its content and removed blocked This PR is blocked waiting for some other PR labels Sep 2, 2022
@Jaic1
Copy link
Contributor Author

Jaic1 commented Sep 5, 2022

Yes, the doc in this PR need to change to reflect the recent changes in rust-lang/rust#99102. But we could wait a minute until it gets more stable and complete since the MIR phases and semantics there, I think, are under overhaul.

@JohnTitor JohnTitor added blocked This PR is blocked waiting for some other PR and removed waiting-on-review This PR is waiting for a reviewer to verify its content labels Sep 12, 2022
@jyn514
Copy link
Member

jyn514 commented Jan 1, 2023

rust-lang/rust#99102 has been merged :)

@jyn514 jyn514 removed the blocked This PR is blocked waiting for some other PR label Jan 1, 2023
@JohnTitor JohnTitor added the waiting-on-review This PR is waiting for a reviewer to verify its content label Feb 2, 2023
@JohnTitor
Copy link
Member

@oli-obk Could you help with the review here or ping relevant folks?
@Jaic1 Could you resolve the merge conflict meanwhile?

src/mir/passes.md Outdated Show resolved Hide resolved
@oli-obk
Copy link
Contributor

oli-obk commented Feb 9, 2023

cc @JakobDegen

@spastorino spastorino added waiting-on-author This PR is waiting for additional action by the OP and removed waiting-on-review This PR is waiting for a reviewer to verify its content labels Feb 15, 2023
@spastorino
Copy link
Member

I'm not sure what's the current status of this PR, but would be great if we merge something about it, thoughts?.

@Jaic1
Copy link
Contributor Author

Jaic1 commented Jun 30, 2024

Sorry for the late reply, I had been busy with my master project for the last few years.

I just refined the MIR passes doc and resolved the git conflicts.

@Jaic1
Copy link
Contributor Author

Jaic1 commented Jun 30, 2024

cc @spastorino, could you help me find some reviewers?

@Jaic1 Jaic1 requested review from oli-obk and tshepang June 30, 2024 03:10
@oli-obk
Copy link
Contributor

oli-obk commented Jul 9, 2024

Please rebase so there are no more merge commits

Jaic1 and others added 3 commits July 10, 2024 13:51
accidently -> accidentally

Co-authored-by: Tshepang Mbambo <tshepang@gmail.com>
@Jaic1
Copy link
Contributor Author

Jaic1 commented Jul 10, 2024

Please rebase so there are no more merge commits

Done.

Copy link
Member

@spastorino spastorino left a comment

Choose a reason for hiding this comment

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

Looks good to me but I'd leave the merge up to @oli-obk who knows better about MIR than me.

@oli-obk oli-obk merged commit 0c4d55c into rust-lang:master Jul 15, 2024
1 check passed
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 15, 2024
Update books

## rust-lang/book

3 commits in f1e49bf7a8ea6c31ce016a52b8a4f6e1ffcfbc64..67fa536768013d9d5a13f3a06790521d511ef711
2024-07-12 21:21:45 UTC to 2024-07-05 17:35:06 UTC

- Use Rust 2021 Edition for mdBook (rust-lang/book#3974)
- Backport changes to chapter 11 (rust-lang/book#3969)
- Upgrade to Rust 1.79.0 (rust-lang/book#3968)

## rust-lang/edition-guide

2 commits in 941db8b3df45fd46cd87b50a5c86714b91dcde9c..5454de3d12b9ccc6375b629cf7ccda8264640aac
2024-07-14 07:06:34 UTC to 2024-07-12 06:05:29 UTC

- Update timeline etc. for Rust 2024
- 2024: Add note about never_type_fallback_flowing_into_unsafe lint level. (rust-lang/edition-guide#311)

## rust-embedded/book

1 commits in b10c6acaf0f43481f6600e95d4b5013446e29f7a..019f3928d8b939ec71b63722dcc2e46330156441
2024-07-11 17:46:10 UTC to 2024-07-11 17:46:10 UTC

- typo on tooling.md (rust-embedded/book#373)

## rust-lang/reference

9 commits in 1ae3deebc3ac16e276b6558e01420f8e605def08..e2f0bdc4031866734661dcdb548184bde1450baf
2024-06-29 16:59:51 +0000 to 2024-07-15 17:52:44 +0000

- Suppress type length limit test and note that it is not enforced (rust-lang/reference#1527)
- elaborate on slice wide pointer metadata (rust-lang/reference#1499)
- '.inst' in inline-assembly changed to '.insn' (rust-lang/reference#1453)
- Clarify that `asm!` blocks can be duplicated or deduplicated by the compiler (rust-lang/reference#1441)
- Add mdbook-spec (rust-lang/reference#1520)
- Add note about static libraries not linking their dependencies (rust-lang/reference#1472)
- more explicitly explain the UB around immutable extern statics (rust-lang/reference#1502)
- Improvements to `items/functions.md` (rust-lang/reference#1458)
- Enable mdbook smart-punctuation. (rust-lang/reference#1516)

## rust-lang/rust-by-example

1 commits in 658c6c27cb975b92227936024816986c2d3716fb..89aecb6951b77bc746da73df8c9f2b2ceaad494a
2024-07-11 12:33:43 UTC to 2024-07-11 12:33:43 UTC

- Update option_result.md (rust-lang/rust-by-example#1864)

## rust-lang/rustc-dev-guide

6 commits in d6e3a32a557db5902e714604def8015d6bb7e0f7..0c4d55cb59fe440d1a630e4e5774d043968edb3f
2024-07-15 15:16:43 UTC to 2024-07-01 19:05:14 UTC

- Improve documentation of MIR queries & passes (rust-lang/rustc-dev-guide#1434)
- Bump dependencies for date-check tool (rust-lang/rustc-dev-guide#2012)
- Fix typo: lists -> lints (rust-lang/rustc-dev-guide#2011)
- use "bootstrap" instead of "rustbuild" (rust-lang/rustc-dev-guide#2010)
- Fix grammar issue in optimize-build.md (rust-lang/rustc-dev-guide#2009)
- Update name of Fuchsia builder (rust-lang/rustc-dev-guide#2008)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 15, 2024
Update books

## rust-lang/book

3 commits in f1e49bf7a8ea6c31ce016a52b8a4f6e1ffcfbc64..67fa536768013d9d5a13f3a06790521d511ef711
2024-07-12 21:21:45 UTC to 2024-07-05 17:35:06 UTC

- Use Rust 2021 Edition for mdBook (rust-lang/book#3974)
- Backport changes to chapter 11 (rust-lang/book#3969)
- Upgrade to Rust 1.79.0 (rust-lang/book#3968)

## rust-lang/edition-guide

2 commits in 941db8b3df45fd46cd87b50a5c86714b91dcde9c..5454de3d12b9ccc6375b629cf7ccda8264640aac
2024-07-14 07:06:34 UTC to 2024-07-12 06:05:29 UTC

- Update timeline etc. for Rust 2024
- 2024: Add note about never_type_fallback_flowing_into_unsafe lint level. (rust-lang/edition-guide#311)

## rust-embedded/book

1 commits in b10c6acaf0f43481f6600e95d4b5013446e29f7a..019f3928d8b939ec71b63722dcc2e46330156441
2024-07-11 17:46:10 UTC to 2024-07-11 17:46:10 UTC

- typo on tooling.md (rust-embedded/book#373)

## rust-lang/reference

9 commits in 1ae3deebc3ac16e276b6558e01420f8e605def08..e2f0bdc4031866734661dcdb548184bde1450baf
2024-06-29 16:59:51 +0000 to 2024-07-15 17:52:44 +0000

- Suppress type length limit test and note that it is not enforced (rust-lang/reference#1527)
- elaborate on slice wide pointer metadata (rust-lang/reference#1499)
- '.inst' in inline-assembly changed to '.insn' (rust-lang/reference#1453)
- Clarify that `asm!` blocks can be duplicated or deduplicated by the compiler (rust-lang/reference#1441)
- Add mdbook-spec (rust-lang/reference#1520)
- Add note about static libraries not linking their dependencies (rust-lang/reference#1472)
- more explicitly explain the UB around immutable extern statics (rust-lang/reference#1502)
- Improvements to `items/functions.md` (rust-lang/reference#1458)
- Enable mdbook smart-punctuation. (rust-lang/reference#1516)

## rust-lang/rust-by-example

1 commits in 658c6c27cb975b92227936024816986c2d3716fb..89aecb6951b77bc746da73df8c9f2b2ceaad494a
2024-07-11 12:33:43 UTC to 2024-07-11 12:33:43 UTC

- Update option_result.md (rust-lang/rust-by-example#1864)

## rust-lang/rustc-dev-guide

6 commits in d6e3a32a557db5902e714604def8015d6bb7e0f7..0c4d55cb59fe440d1a630e4e5774d043968edb3f
2024-07-15 15:16:43 UTC to 2024-07-01 19:05:14 UTC

- Improve documentation of MIR queries & passes (rust-lang/rustc-dev-guide#1434)
- Bump dependencies for date-check tool (rust-lang/rustc-dev-guide#2012)
- Fix typo: lists -> lints (rust-lang/rustc-dev-guide#2011)
- use "bootstrap" instead of "rustbuild" (rust-lang/rustc-dev-guide#2010)
- Fix grammar issue in optimize-build.md (rust-lang/rustc-dev-guide#2009)
- Update name of Fuchsia builder (rust-lang/rustc-dev-guide#2008)
tgross35 added a commit to tgross35/rust that referenced this pull request Jul 16, 2024
Update books

## rust-lang/book

3 commits in f1e49bf7a8ea6c31ce016a52b8a4f6e1ffcfbc64..67fa536768013d9d5a13f3a06790521d511ef711
2024-07-12 21:21:45 UTC to 2024-07-05 17:35:06 UTC

- Use Rust 2021 Edition for mdBook (rust-lang/book#3974)
- Backport changes to chapter 11 (rust-lang/book#3969)
- Upgrade to Rust 1.79.0 (rust-lang/book#3968)

## rust-lang/edition-guide

2 commits in 941db8b3df45fd46cd87b50a5c86714b91dcde9c..5454de3d12b9ccc6375b629cf7ccda8264640aac
2024-07-14 07:06:34 UTC to 2024-07-12 06:05:29 UTC

- Update timeline etc. for Rust 2024
- 2024: Add note about never_type_fallback_flowing_into_unsafe lint level. (rust-lang/edition-guide#311)

## rust-embedded/book

1 commits in b10c6acaf0f43481f6600e95d4b5013446e29f7a..019f3928d8b939ec71b63722dcc2e46330156441
2024-07-11 17:46:10 UTC to 2024-07-11 17:46:10 UTC

- typo on tooling.md (rust-embedded/book#373)

## rust-lang/reference

9 commits in 1ae3deebc3ac16e276b6558e01420f8e605def08..e2f0bdc4031866734661dcdb548184bde1450baf
2024-06-29 16:59:51 +0000 to 2024-07-15 17:52:44 +0000

- Suppress type length limit test and note that it is not enforced (rust-lang/reference#1527)
- elaborate on slice wide pointer metadata (rust-lang/reference#1499)
- '.inst' in inline-assembly changed to '.insn' (rust-lang/reference#1453)
- Clarify that `asm!` blocks can be duplicated or deduplicated by the compiler (rust-lang/reference#1441)
- Add mdbook-spec (rust-lang/reference#1520)
- Add note about static libraries not linking their dependencies (rust-lang/reference#1472)
- more explicitly explain the UB around immutable extern statics (rust-lang/reference#1502)
- Improvements to `items/functions.md` (rust-lang/reference#1458)
- Enable mdbook smart-punctuation. (rust-lang/reference#1516)

## rust-lang/rust-by-example

1 commits in 658c6c27cb975b92227936024816986c2d3716fb..89aecb6951b77bc746da73df8c9f2b2ceaad494a
2024-07-11 12:33:43 UTC to 2024-07-11 12:33:43 UTC

- Update option_result.md (rust-lang/rust-by-example#1864)

## rust-lang/rustc-dev-guide

6 commits in d6e3a32a557db5902e714604def8015d6bb7e0f7..0c4d55cb59fe440d1a630e4e5774d043968edb3f
2024-07-15 15:16:43 UTC to 2024-07-01 19:05:14 UTC

- Improve documentation of MIR queries & passes (rust-lang/rustc-dev-guide#1434)
- Bump dependencies for date-check tool (rust-lang/rustc-dev-guide#2012)
- Fix typo: lists -> lints (rust-lang/rustc-dev-guide#2011)
- use "bootstrap" instead of "rustbuild" (rust-lang/rustc-dev-guide#2010)
- Fix grammar issue in optimize-build.md (rust-lang/rustc-dev-guide#2009)
- Update name of Fuchsia builder (rust-lang/rustc-dev-guide#2008)
tgross35 added a commit to tgross35/rust that referenced this pull request Jul 16, 2024
Update books

## rust-lang/book

3 commits in f1e49bf7a8ea6c31ce016a52b8a4f6e1ffcfbc64..67fa536768013d9d5a13f3a06790521d511ef711
2024-07-12 21:21:45 UTC to 2024-07-05 17:35:06 UTC

- Use Rust 2021 Edition for mdBook (rust-lang/book#3974)
- Backport changes to chapter 11 (rust-lang/book#3969)
- Upgrade to Rust 1.79.0 (rust-lang/book#3968)

## rust-lang/edition-guide

2 commits in 941db8b3df45fd46cd87b50a5c86714b91dcde9c..5454de3d12b9ccc6375b629cf7ccda8264640aac
2024-07-14 07:06:34 UTC to 2024-07-12 06:05:29 UTC

- Update timeline etc. for Rust 2024
- 2024: Add note about never_type_fallback_flowing_into_unsafe lint level. (rust-lang/edition-guide#311)

## rust-embedded/book

1 commits in b10c6acaf0f43481f6600e95d4b5013446e29f7a..019f3928d8b939ec71b63722dcc2e46330156441
2024-07-11 17:46:10 UTC to 2024-07-11 17:46:10 UTC

- typo on tooling.md (rust-embedded/book#373)

## rust-lang/reference

9 commits in 1ae3deebc3ac16e276b6558e01420f8e605def08..e2f0bdc4031866734661dcdb548184bde1450baf
2024-06-29 16:59:51 +0000 to 2024-07-15 17:52:44 +0000

- Suppress type length limit test and note that it is not enforced (rust-lang/reference#1527)
- elaborate on slice wide pointer metadata (rust-lang/reference#1499)
- '.inst' in inline-assembly changed to '.insn' (rust-lang/reference#1453)
- Clarify that `asm!` blocks can be duplicated or deduplicated by the compiler (rust-lang/reference#1441)
- Add mdbook-spec (rust-lang/reference#1520)
- Add note about static libraries not linking their dependencies (rust-lang/reference#1472)
- more explicitly explain the UB around immutable extern statics (rust-lang/reference#1502)
- Improvements to `items/functions.md` (rust-lang/reference#1458)
- Enable mdbook smart-punctuation. (rust-lang/reference#1516)

## rust-lang/rust-by-example

1 commits in 658c6c27cb975b92227936024816986c2d3716fb..89aecb6951b77bc746da73df8c9f2b2ceaad494a
2024-07-11 12:33:43 UTC to 2024-07-11 12:33:43 UTC

- Update option_result.md (rust-lang/rust-by-example#1864)

## rust-lang/rustc-dev-guide

6 commits in d6e3a32a557db5902e714604def8015d6bb7e0f7..0c4d55cb59fe440d1a630e4e5774d043968edb3f
2024-07-15 15:16:43 UTC to 2024-07-01 19:05:14 UTC

- Improve documentation of MIR queries & passes (rust-lang/rustc-dev-guide#1434)
- Bump dependencies for date-check tool (rust-lang/rustc-dev-guide#2012)
- Fix typo: lists -> lints (rust-lang/rustc-dev-guide#2011)
- use "bootstrap" instead of "rustbuild" (rust-lang/rustc-dev-guide#2010)
- Fix grammar issue in optimize-build.md (rust-lang/rustc-dev-guide#2009)
- Update name of Fuchsia builder (rust-lang/rustc-dev-guide#2008)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 16, 2024
Rollup merge of rust-lang#127770 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/book

3 commits in f1e49bf7a8ea6c31ce016a52b8a4f6e1ffcfbc64..67fa536768013d9d5a13f3a06790521d511ef711
2024-07-12 21:21:45 UTC to 2024-07-05 17:35:06 UTC

- Use Rust 2021 Edition for mdBook (rust-lang/book#3974)
- Backport changes to chapter 11 (rust-lang/book#3969)
- Upgrade to Rust 1.79.0 (rust-lang/book#3968)

## rust-lang/edition-guide

2 commits in 941db8b3df45fd46cd87b50a5c86714b91dcde9c..5454de3d12b9ccc6375b629cf7ccda8264640aac
2024-07-14 07:06:34 UTC to 2024-07-12 06:05:29 UTC

- Update timeline etc. for Rust 2024
- 2024: Add note about never_type_fallback_flowing_into_unsafe lint level. (rust-lang/edition-guide#311)

## rust-embedded/book

1 commits in b10c6acaf0f43481f6600e95d4b5013446e29f7a..019f3928d8b939ec71b63722dcc2e46330156441
2024-07-11 17:46:10 UTC to 2024-07-11 17:46:10 UTC

- typo on tooling.md (rust-embedded/book#373)

## rust-lang/reference

9 commits in 1ae3deebc3ac16e276b6558e01420f8e605def08..e2f0bdc4031866734661dcdb548184bde1450baf
2024-06-29 16:59:51 +0000 to 2024-07-15 17:52:44 +0000

- Suppress type length limit test and note that it is not enforced (rust-lang/reference#1527)
- elaborate on slice wide pointer metadata (rust-lang/reference#1499)
- '.inst' in inline-assembly changed to '.insn' (rust-lang/reference#1453)
- Clarify that `asm!` blocks can be duplicated or deduplicated by the compiler (rust-lang/reference#1441)
- Add mdbook-spec (rust-lang/reference#1520)
- Add note about static libraries not linking their dependencies (rust-lang/reference#1472)
- more explicitly explain the UB around immutable extern statics (rust-lang/reference#1502)
- Improvements to `items/functions.md` (rust-lang/reference#1458)
- Enable mdbook smart-punctuation. (rust-lang/reference#1516)

## rust-lang/rust-by-example

1 commits in 658c6c27cb975b92227936024816986c2d3716fb..89aecb6951b77bc746da73df8c9f2b2ceaad494a
2024-07-11 12:33:43 UTC to 2024-07-11 12:33:43 UTC

- Update option_result.md (rust-lang/rust-by-example#1864)

## rust-lang/rustc-dev-guide

6 commits in d6e3a32a557db5902e714604def8015d6bb7e0f7..0c4d55cb59fe440d1a630e4e5774d043968edb3f
2024-07-15 15:16:43 UTC to 2024-07-01 19:05:14 UTC

- Improve documentation of MIR queries & passes (rust-lang/rustc-dev-guide#1434)
- Bump dependencies for date-check tool (rust-lang/rustc-dev-guide#2012)
- Fix typo: lists -> lints (rust-lang/rustc-dev-guide#2011)
- use "bootstrap" instead of "rustbuild" (rust-lang/rustc-dev-guide#2010)
- Fix grammar issue in optimize-build.md (rust-lang/rustc-dev-guide#2009)
- Update name of Fuchsia builder (rust-lang/rustc-dev-guide#2008)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-author This PR is waiting for additional action by the OP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants