Skip to content

Conversation

@bobmcwhirter
Copy link
Collaborator

Attempt at less-than-full-byte-boundary B patching.

@bobmcwhirter
Copy link
Collaborator Author

Argh. My square bracket and the mask are interleaved poorly.

@bobmcwhirter
Copy link
Collaborator Author

Code updated.

@bobmcwhirter bobmcwhirter force-pushed the svm/aarch64 branch 15 times, most recently from d0a2374 to 9d78bfa Compare March 13, 2019 19:41
sanzinger pushed a commit that referenced this pull request Jan 14, 2020
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
@sanzinger
Copy link
Owner

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.

@sanzinger
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants