elliottt opened PR #5740 from trevor/pub-blocks to main:
Similar to when we exposed the
DataFlowGraph::instsfield through a restrictive newtype, exposeDataFlowGraph::blocksthrough an interfac that allows a restrictive set of operations. This field being public now allows us to avoid a rematch in ssa construction, and simplifies the implementation of adding a block argument to a block referenced by abr_tableinstruction.
<!--Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
elliottt requested jameysharp for a review on PR #5740.
elliottt updated PR #5740 from trevor/pub-blocks to main.
elliottt requested cfallin for a review on PR #5740.
jameysharp submitted PR review.
jameysharp submitted PR review.
jameysharp created PR review comment:
Others may disagree with me here but I don't think there's value in the
num_block_paramsinterface. Getting the slice of block params doesn't cost any more than getting its length (I think it adds 4 to a pointer it already computed to get the length, and returns the adjusted pointer along with the length) so I don't think the extra API clutter is worth its weight.We can leave
DataFlowGraph::num_block_paramsso we aren't forcing people to change their calls for no reason, but I'd rather not add this function in this new spot.
jameysharp created PR review comment:
Bikeshed: Since
make_blockis already accessed through a field named "blocks", how about a name that doesn't have "block" in it? I was tempted to suggestblocks.new()but that's not exactly idiomatic, so maybe justblocks.add()?
elliottt submitted PR review.
elliottt created PR review comment:
I like that!
elliottt submitted PR review.
elliottt created PR review comment:
That sounds good to me!
elliottt updated PR #5740 from trevor/pub-blocks to main.
elliottt requested jameysharp for a review on PR #5740.
elliottt updated PR #5740 from trevor/pub-blocks to main.
elliottt updated PR #5740 from trevor/pub-blocks to main.
jameysharp submitted PR review.
elliottt edited PR #5740 from trevor/pub-blocks to main:
Similar to when we exposed the
DataFlowGraph::instsfield through a restrictive newtype, exposeDataFlowGraph::blocksthrough an interface that allows a restrictive set of operations. This field being public now allows us to avoid a rematch in ssa construction, and simplifies the implementation of adding a block argument to a block referenced by abr_tableinstruction.
<!--Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
elliottt merged PR #5740.
Last updated: Dec 06 2025 at 06:05 UTC