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

[compiler] ReactiveIR: refactor Branch/Fallthrough #32027

Open
wants to merge 1 commit into
base: gh/josephsavona/67/base
Choose a base branch
from

Conversation

josephsavona
Copy link
Contributor

@josephsavona josephsavona commented Jan 8, 2025

Stack from ghstack (oldest at bottom):

Continuing the exploration of the sea-of-nodes ReactiveIR.

Three main changes:

  • ReactiveGraph has both entry and exit. Entry is mostly for completeness since it would be the first entry in the nodes map.
  • Moves the 'terminal' data from JoinNode to BranchNode. Each branch has both an entry and exit, but these are intended for use with reconstruction back to ReactiveFunction and for interpreting the IR or forward data flow analysis.
  • Renames JoinNode => FallthroughNode, removing the terminal.

Combined with the previous changes — ensuring that every block ends in a terminal that has controls transitively through to its entry node — it's now always possible to reach all nodes from the exit and to walk forward for forward data flow analysis or abstract/actual interpretation of the instructions.

Continuing the exploration of the sea-of-nodes ReactiveIR.

Three main changes:
* ReactiveGraph has both entry and exit. Entry is mostly for completeness since it would be the first entry in the nodes map.
* Moves the 'terminal' data from JoinNode to BranchNode. Each branch has both an entry and exit, but these are intended for use with reconstruction back to ReactiveFunction and for interpreting the IR or forward data flow analysis.
* Renames JoinNode => FallthroughNode, removing the terminal.

Combined with the previous changes — ensuring that every block ends in a terminal that has controls transitively through to its entry node — it's now always possible to reach all nodes from the exit and to walk forward for forward data flow analysis or abstract/actual interpretation of the instructions.

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 8, 2025
josephsavona added a commit that referenced this pull request Jan 8, 2025
Continuing the exploration of the sea-of-nodes ReactiveIR.

Three main changes:
* ReactiveGraph has both entry and exit. Entry is mostly for completeness since it would be the first entry in the nodes map.
* Moves the 'terminal' data from JoinNode to BranchNode. Each branch has both an entry and exit, but these are intended for use with reconstruction back to ReactiveFunction and for interpreting the IR or forward data flow analysis.
* Renames JoinNode => FallthroughNode, removing the terminal.

Combined with the previous changes — ensuring that every block ends in a terminal that has controls transitively through to its entry node — it's now always possible to reach all nodes from the exit and to walk forward for forward data flow analysis or abstract/actual interpretation of the instructions.

ghstack-source-id: 23f3e74b57347e321a77381e1f0d14b63569e1af
Pull Request resolved: #32027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants