Skip to content

Add cycle detection to ResourceSharingPass::PerformFoldingActions.#4056

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_895433062
Apr 10, 2026
Merged

Add cycle detection to ResourceSharingPass::PerformFoldingActions.#4056
copybara-service[bot] merged 1 commit intomainfrom
test_895433062

Conversation

@copybara-service
Copy link
Copy Markdown

Add cycle detection to ResourceSharingPass::PerformFoldingActions.

This change modifies the PerformFoldingActions function to check that the introduction of priority_sel input selection would not introduce a cycle when the folded nodes are merged together. This is to ensure the pass does not produce an unrecoverable error that would otherwise occur when the next pass attempts to iterate nodes using DfsVisitor.

This does not yet solve the underlying bug in folding action legalization or analysis that exists but surfaces that error in a more usable way.

@copybara-service copybara-service bot force-pushed the test_895433062 branch 3 times, most recently from 767b76f to 0b64dd9 Compare April 10, 2026 16:11
This change modifies the PerformFoldingActions function to check that the introduction of priority_sel input selection would not introduce a cycle when the folded nodes are merged together. This is to ensure the pass does not produce an unrecoverable error that would otherwise occur when the next pass attempts to iterate nodes using DfsVisitor.

This does not yet solve the underlying bug in folding action legalization or analysis that exists but surfaces that error in a more usable way.

PiperOrigin-RevId: 897737259
@copybara-service copybara-service bot merged commit c1731fc into main Apr 10, 2026
@copybara-service copybara-service bot deleted the test_895433062 branch April 10, 2026 16:43
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