Skip to content

[Explicit State Access] Codegen support for unread/multi-read Next nodes without optimization passes#4177

Draft
copybara-service[bot] wants to merge 1 commit intomainfrom
test_906504274
Draft

[Explicit State Access] Codegen support for unread/multi-read Next nodes without optimization passes#4177
copybara-service[bot] wants to merge 1 commit intomainfrom
test_906504274

Conversation

@copybara-service
Copy link
Copy Markdown

[Explicit State Access] Codegen support for unread/multi-read Next nodes without optimization passes

This change enables the codegen pipeline to handle Next nodes that reference a StateElement directly, without an associated StateRead.

  • Update CalculateConcurrentStages and InsertPipelineRegisters in pipeline_register_insertion_pass.cc to query Proc for state reads when a Next node doesn't have one.
  • Add a new test case ProcWithExplicitStateAccessNewApi in convert_to_block_test.cc using the new API and verify it completes codegen successfully.

…des without optimization passes

This change enables the codegen pipeline to handle `Next` nodes that reference a `StateElement` directly, without an associated `StateRead`.

- Update `CalculateConcurrentStages` and `InsertPipelineRegisters` in `pipeline_register_insertion_pass.cc` to query `Proc` for state reads when a `Next` node doesn't have one.
- Add a new test case `ProcWithExplicitStateAccessNewApi` in `convert_to_block_test.cc` using the new API and verify it completes codegen successfully.

PiperOrigin-RevId: 906504274
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