Skip to content

Unify DataInst and Node (removing NodeKind::Block in the process). - #33

Draft
eddyb wants to merge 6 commits into
eddyb/post-spirt-0.5.0-mem-cffrom
eddyb/insts-are-nodes
Draft

eddyb wants to merge 6 commits into
eddyb/post-spirt-0.5.0-mem-cffrom
eddyb/insts-are-nodes

Conversation

@eddyb

@eddyb eddyb commented Apr 22, 2026

Copy link
Copy Markdown
Member

Note: this PR is a draft to avoid accidental merging onto its "base" branch (used as a form of ad-hoc PR stacking), and will remain as such, until its "base" branch can be set to main, i.e. all prerequisite PRs will have landed.


This PR removes the distinction between DataInst and Node (formerly ControlNode), and the NodeKind::Block container for DataInst (flattening them into the parent Region of the "block" Node, instead).

The distinction was purely artificial, and mainly guided by remaining close to SPIR-V wherever possible, but SPIR-V blocks are already regenerated (in spv::lift) from sequences of instructions chained by linear control-flow, so there is no significant benefit to keeping the DataInst split (or their "block" containers).

Keeping only "regions" and "nodes" also aligns better with RVSDG (where SPIR-T gets those concepts from).


TODO: finish node-vs-node-output attribute handling, remove the DataInst/DataInstDef/DataInstKind aliases from these commits and future ones (along with the naming style of inst, however convenient it may have been).

@eddyb
eddyb force-pushed the eddyb/insts-are-nodes branch 2 times, most recently from 0cb0fdb to c9d3a19 Compare October 9, 2026 16:53
@eddyb
eddyb force-pushed the eddyb/insts-are-nodes branch from c9d3a19 to dcdb14d Compare October 12, 2026 10:56
@eddyb
eddyb force-pushed the eddyb/insts-are-nodes branch from dcdb14d to 7f8fc31 Compare October 12, 2026 11:03
@eddyb
eddyb force-pushed the eddyb/insts-are-nodes branch from 7f8fc31 to 52c27ef Compare October 12, 2026 14:41
@eddyb
eddyb force-pushed the eddyb/insts-are-nodes branch from 52c27ef to 57541d1 Compare October 12, 2026 14:46
@eddyb
eddyb changed the base branch from eddyb/post-rust-gpu-0.10 to eddyb/post-spirt-0.5.0-mem-cf October 12, 2026 14:48
@eddyb
eddyb added this pull request to stack #53 October 12, 2026 15:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant