Skip to content

Generalize the select-collapse logic in the BDD simplification pass. - #4801

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_965956443
Aug 20, 2026
Merged

Generalize the select-collapse logic in the BDD simplification pass.#4801
copybara-service[bot] merged 1 commit into
mainfrom
test_965956443

Conversation

@copybara-service

Copy link
Copy Markdown

Generalize the select-collapse logic in the BDD simplification pass.

This change adds the ability to collapse a chain of heterogeneous select nodes (composed of Select, PrioritySelect, and OneHotSelect) into a single OneHotSelect.

This is achieved by generalizing the existing logic within the BDD simplification pass, which previously only collapsed chains of standard Select nodes.

This change also extracts this transformation from the BDD simplification pass to its own pass.
The new pass, called collapse select chains pass, is invoked towards the end of the optimization pipeline to avoid blocking the analyses that tend to be more accurate with simple select nodes.

@copybara-service
copybara-service Bot force-pushed the test_965956443 branch 4 times, most recently from 75449e6 to f5d5174 Compare August 20, 2026 17:57
This change adds the ability to collapse a chain of heterogeneous select nodes (composed of Select, PrioritySelect, and OneHotSelect) into a single OneHotSelect.

This is achieved by generalizing the existing logic within the BDD simplification pass, which previously only collapsed chains of standard Select nodes.

This change also extracts this transformation from the BDD simplification pass to its own pass.
The new pass, called collapse select chains pass, is invoked towards the end of the optimization pipeline to avoid blocking the analyses that tend to be more accurate with simple select nodes.

PiperOrigin-RevId: 967966663
@copybara-service
copybara-service Bot merged commit b5569e4 into main Aug 20, 2026
5 checks passed
@copybara-service
copybara-service Bot deleted the test_965956443 branch August 20, 2026 19:05
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