-
Notifications
You must be signed in to change notification settings - Fork 1
Attempt at less-than-full-byte-boundary B patching. #2
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
base: svm/aarch64
Are you sure you want to change the base?
Conversation
bobmcwhirter
commented
Jan 28, 2019
|
Argh. My square bracket and the mask are interleaved poorly. |
|
Code updated. |
d0a2374 to
9d78bfa
Compare
We want to find a better way to implement array offset calculation.
The old pattern for an int array member loading is:
and x4, x3, #0xffffffff
lsl x4, x4, #2
add x4, x4, #0x10
ldr x0, [x2, x4]
And the optimized pattern is:
add x1, x2, w3, uxtw #2
ldr x0, [x1, #16]
Here is a jmh unit test for int array member loading:
private final int func(int[] arr) {
int ret = 0;
for (int i=0; i < field0; i++) {
ret += arr[i];
}
return ret;
}
And the jmh performance results:
without this patch with this patch units
1173501.595 948290.420 us/op
Here are the additional issues fixed related to this patch:
1. Fix an issue in MatchProcessor, so that we can process platform specific node
as a matchable node.
2. Close this optimization for substratevm because the derived reference is not
supported yet in SVM.
mx bootstrap passes.
mx gate -o -t 'CTW:hosted' passes.
Change-Id: Ia34f2bf044ca6863be075cf000b29524ca44c42d
|
Hello Bob McWhirter, thanks for contributing a PR to our project! We use the Oracle Contributor Agreement to make the copyright of contributions clear. We don't have a record of you having signed this yet, based on your email address bob -(at)- mcwhirter -(dot)- org. You can sign it at that link. If you think you've already signed it, please comment below and we'll check. |
|
Hello Bob McWhirter, thanks for contributing a PR to our project! We use the Oracle Contributor Agreement to make the copyright of contributions clear. We don't have a record of you having signed this yet, based on your email address bmcwhirt -(at)- redhat -(dot)- com. You can sign it at that link. If you think you've already signed it, please comment below and we'll check. |