-
-
Notifications
You must be signed in to change notification settings - Fork 828
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
feat: more arithmetic optimizations #2647
feat: more arithmetic optimizations #2647
Conversation
cdca867
to
4e71f13
Compare
This pull request introduces 1 alert when merging 38bdfad into 43f491f - view on LGTM.com new alerts:
|
a6d5b6a
to
885b245
Compare
so caller can delegate the checking
aa1421d
to
abfadc7
Compare
This pull request introduces 11 alerts when merging abfadc7 into 4d32d17 - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #2647 +/- ##
==========================================
+ Coverage 87.50% 87.58% +0.07%
==========================================
Files 94 94
Lines 10118 10158 +40
Branches 2491 2506 +15
==========================================
+ Hits 8854 8897 +43
+ Misses 801 792 -9
- Partials 463 469 +6
Continue to review full report at Codecov.
|
this is a small rewrite of the IR optimizer. it changes the structure of the binop optimizations so that it is easier to add more optimizations. it also refactors the `clamp` optimizations to be in terms of an `assert` statement, so that the clamp conditions can be optimized using the binop optimizer code.
abfadc7
to
8e6309b
Compare
they are pretty much semantically the same now
replaced with a utility codegen routine
it can backfire if the condition already has an iszero in it, e.g. ``` if (iszero x) {if_branch} {else_branch} ``` would get rewritten to ``` if (iszero (iszero x)) {else_branch} {if_branch} ``` which still has an iszero in the final assembly!
optimizations for `sub` are probably better.
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.
🚀 amazing
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
this is a small rewrite of the IR optimizer. it changes the structure of the binop optimizations so that it is easier to add more optimizations. it also refactors the `clamp` optimizations to be in terms of an `assert` statement, so that the clamp conditions can be optimized using the binop optimizer code. Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
This reverts commit efe1dbe.
What I did
How I did it
How to verify it
tests pass
Commit Message
Description for the changelog
Cute Animal Picture