[Explicit State Access] Support multiple StateRead nodes in proc_state_legalization_pass.cc. - #4816
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
[Explicit State Access] Support multiple StateRead nodes in proc_state_legalization_pass.cc. #4816copybara-service[bot] wants to merge 1 commit into
StateRead nodes in proc_state_legalization_pass.cc. #4816copybara-service[bot] wants to merge 1 commit into
Conversation
…ate_legalization_pass.cc. To support multiple state reads: * Generate a mutex assertion for `StateRead` nodes to verify at most one `StateRead` is active for a state element * Generate write-without-read assertions that a `Next` node can only fire when the corresponding `StateRead` is active * If there are no explicit next nodes for a `StateRead`, generate a default `Next` node * If there are explicit next nodes, generate a default next value node for each `StateRead` when there are no explicit `Next` nodes active and the corresponding read's predicate is active. This helps preserve state when no explicit next fires. * Loop through all `StateRead` nodes in order to ensure the pass is idempotent by not creating default `Next` nodes when they exist. PiperOrigin-RevId: 967571718
StateRead nodes in proc_state_legalization_pass.cc.
copybara-service
Bot
force-pushed
the
test_967571718
branch
from
August 20, 2026 15:48
9361d8a to
80dfcfc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Explicit State Access] Support multiple
StateReadnodes in proc_state_legalization_pass.cc.To support multiple state reads:
StateReadnodes to verify at most oneStateReadis active for a state elementNextnode can only fire when the correspondingStateReadis activeStateRead, generate a defaultNextnodeStateReadwhen there are no explicitNextnodes active and the corresponding read's predicate is active. This helps preserve state when no explicit next fires.StateReadnodes in order to ensure the pass is idempotent by not creating defaultNextnodes when they exist.