-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Conversation
d985763
to
91ba04d
Compare
@@ -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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
@bors r+ rollup |
📌 Commit 91ba04d has been approved by |
BasicBlock
is just a pointerBasicBlock
is just an index
⌛ Testing commit 91ba04d with merge 896181774ea66a5b554c8daeacde8679b2476b8c... |
💔 Test failed - checks-actions |
Network failure. |
☀️ Test successful - checks-actions, checks-azure |
r? @RalfJung