-
Notifications
You must be signed in to change notification settings - Fork 77
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
transforms: Add convert-varith-to-arith pass #3309
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3309 +/- ##
==========================================
- Coverage 90.03% 90.03% -0.01%
==========================================
Files 448 448
Lines 56346 56370 +24
Branches 5403 5405 +2
==========================================
+ Hits 50731 50752 +21
- Misses 4189 4191 +2
- Partials 1426 1427 +1 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Nicolai Stawinoga <36768051+n-io@users.noreply.github.com>
26397c7
to
135459b
Compare
Co-authored-by: n-io <n-io@users.noreply.github.com>
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.
Looks really good, thanks for that. There's an edge case where the varith op only has one operand, in which case you could just output the operand without generating an arith op, e.g. replace_matched_op([], new_results=[first_arg])
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.
Looks really good! Just minor things and API suggestions left
Co-authored-by: Nicolai Stawinoga <36768051+n-io@users.noreply.github.com>
Co-authored-by: Nicolai Stawinoga <36768051+n-io@users.noreply.github.com>
Co-authored-by: Nicolai Stawinoga <36768051+n-io@users.noreply.github.com>
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.
LGTM, thanks for this
Nice. Amazing to see this merged so quickly. |
Adding a convert-varith-to-arith pass, which reverses the convert-arith-to-varith pass, rewriting varith operations as a sequence of arith operations. --- --------- Co-authored-by: emmau678 <eu233@Emma-laptop> Co-authored-by: Nicolai Stawinoga <36768051+n-io@users.noreply.github.com> Co-authored-by: n-io <n-io@users.noreply.github.com>
Adding a convert-varith-to-arith pass, which reverses the convert-arith-to-varith pass, rewriting varith operations as a sequence of arith operations.