-
Notifications
You must be signed in to change notification settings - Fork 16
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
MassaLabs: Eliminate exponentiations in the IR #352
MassaLabs: Eliminate exponentiations in the IR #352
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.
LGTM - the clippy errors need to be fixed, but I'll do that in my functions branch, and then we can rebase on top of that to get a green build again
@Leo-Besancon I've addressed the clippy warnings in |
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 great! Thank you! My only one suggestion would be to modify one of the tests somewhere so that we see how expanding something other than squaring works (e.g., have x^7
somewhere).
1c4e707
to
8277fe9
Compare
Thank you @bitwalker and @bobbinth, I resolved the small conflicts and updated the complex function test to test the 7 case. |
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 good! Thank you! I left one comment inline - but this is more for the time when we work on the codegen side. Could you create an issue based on it?
This PR completes #333, and removes the Operation::Exp node in the IR. Instead, parsed exponentiations are reduced to a series of multiplications using square and multiply.