-
Notifications
You must be signed in to change notification settings - Fork 3k
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
jit: Optimize instructions based on operand types #5316
Merged
bjorng
merged 6 commits into
erlang:master
from
jhogberg:john/jit/pass-type-information-to-jit/OTP-17684
Nov 10, 2021
Merged
jit: Optimize instructions based on operand types #5316
bjorng
merged 6 commits into
erlang:master
from
jhogberg:john/jit/pass-type-information-to-jit/OTP-17684
Nov 10, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
garazdawi
approved these changes
Oct 25, 2021
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.
Nice!
92de295
to
f55528d
Compare
a95138a
to
7f5a51c
Compare
Co-authored-by: Björn Gustavsson <bjorn@erlang.org>
7f5a51c
to
a030d5d
Compare
Co-authored-by: Björn Gustavsson <bjorn@erlang.org>
Co-authored-by: Björn Gustavsson <bjorn@erlang.org>
Hoisting the fun check outside these loops lets us skip error checks on the fun calls themselves, which is very nice for functions like foldl/3.
13c2ad4
to
3346acf
Compare
This diff breaks the following example.
Can someone please look into this. I think it is failing for larger integers. |
@itssundeep Thanks, I have created an issue to make sure that we don't forget to fix the bug. |
bjorng
added a commit
to bjorng/otp
that referenced
this pull request
Nov 17, 2021
The type-based optimizations introduced in 3617610 (erlang#5316) could cause `divint` and `rem` instructions to be fused when it was not safe. Closes erlang#5401.
bjorng
added a commit
to bjorng/otp
that referenced
this pull request
Nov 18, 2021
The type-based optimizations introduced in 3617610 (erlang#5316) could cause `int` and `rem` instructions to be fused when it was not safe. Closes erlang#5401.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR lets the JIT optimize instructions by their operand types. The current implementation settles for removing redundant tag tests and the like, but we plan to add more aggressive optimizations in the near future, such as reducing arithmetic to single machine instructions when we've determined they can't overflow.