-
Notifications
You must be signed in to change notification settings - Fork 244
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] Add Switch
to IR
#13963
[compiler] Add Switch
to IR
#13963
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needn't be in this PR, but it'd be nice if hl.switch
from Python generated an ir.Switch
when the discriminant is an int32!
Would you mind taking a look, Chris? |
Nice idea. I hadn't intended to expose this to python just yet. Using a table to index the cases would be much more powerful! |
We have no high-level IR analogue to
CodeBuilderLike.switch
. Such a node is useful for flattening the IR in deeply-nestedIf
nodes, predicated on integer equality.This partially addresses the stack-overflow error on the
matrix_muluti_write_nothing
benchmark, which currently has a stack-overflow error when computing the type of the CDA.