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
Implement register allocator in JIT #244
Conversation
8bcd38f
to
845a9eb
Compare
@clover2123 the 64 bit code is mostly working now, only one test case fails. The The 32 bit code will require more work, that is far more complex because of register pairs (64 bit values are stored in register pairs). |
1d75d90
to
1c16b7c
Compare
Register allocation results on x86-64:
|
x86-32 results:
|
@clover2123 may I ask your help? The only remaining issue for this patch is
I am open to other ideas as well. What do you think? |
d95e671
to
aed85fb
Compare
@zherczeg IMHO 1st option seems more proper than the other because its simple as you mentioned
|
The patch now passes the regression tests. I have added a |
Why did you add an option ( |
And for debugging. It is not necessary, I can remove it. Or it can be removed later. |
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.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
This branch contains an early version of a register allocator for Walrus. It is capable of compiling some WebAssembly code now. For example, our simple fibonacci code:
Code with register allocation (R0-R3 are scratch registers):
Release mode runtime on an x86-64 machine:
interp: 0m0.994s
base-jit: 0m0.557s (1.78 times as fast)
reg-alloc-jit: 0m0.152s (6.53 times as fast)