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

Note that BasicBlock is just an index #78035

Merged
merged 1 commit into from
Oct 18, 2020

Conversation

camelid
Copy link
Member

@camelid camelid commented Oct 17, 2020

@camelid camelid added A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Oct 17, 2020
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2020
@camelid camelid force-pushed the basic-block-pointer-note branch from d985763 to 91ba04d Compare October 17, 2020 20:22
@@ -1106,6 +1106,9 @@ rustc_index::newtype_index! {
/// are edges that go from a multi-successor node to a multi-predecessor node. This pass is
/// needed because some analyses require that there are no critical edges in the CFG.
///
/// Note that this type is just an index into [`Body.basic_blocks`](Body::basic_blocks);
Copy link
Member Author

Choose a reason for hiding this comment

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

Are there other places where BasicBlock is an index?

Copy link
Member

Choose a reason for hiding this comment

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

I don't really understand the question?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn’t sure if there are other places where it is an index into a vector of blocks and I want to make sure I don’t mislead people by saying that it’s an index into specifically Body when in fact there are other places that hold a vector of blocks that are indexed by BasicBlock. Hope that was clearer!

Copy link
Member

Choose a reason for hiding this comment

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

Ah I see, thanks for clarifying.

I don't think there are other lists this is an index into, but you can audit all IndexVec<BasicBlock, _> if you want to be sure.

@RalfJung
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 17, 2020

📌 Commit 91ba04d has been approved by RalfJung

@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 Oct 17, 2020
@JohnTitor JohnTitor changed the title Note that BasicBlock is just a pointer Note that BasicBlock is just an index Oct 17, 2020
@bors
Copy link
Contributor

bors commented Oct 18, 2020

⌛ Testing commit 91ba04d with merge 896181774ea66a5b554c8daeacde8679b2476b8c...

@bors
Copy link
Contributor

bors commented Oct 18, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 18, 2020
@RalfJung
Copy link
Member

Network failure.
@bors retry

@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 Oct 18, 2020
@bors
Copy link
Contributor

bors commented Oct 18, 2020

⌛ Testing commit 91ba04d with merge ad268bd...

@bors
Copy link
Contributor

bors commented Oct 18, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: RalfJung
Pushing ad268bd to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 18, 2020
@bors bors merged commit ad268bd into rust-lang:master Oct 18, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 18, 2020
@camelid camelid deleted the basic-block-pointer-note branch October 18, 2020 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants