Skip to content

Conversation

@knn-k
Copy link
Contributor

@knn-k knn-k commented Apr 18, 2024

This commit improves the performance of arraycopy helpers for AArch64 by omitting alignment checks.

@knn-k
Copy link
Contributor Author

knn-k commented Apr 18, 2024

Jenkins build aarch64,amac

@knn-k
Copy link
Contributor Author

knn-k commented Apr 18, 2024

See #7181 for the failure on x86 macOS.
I ran OpenJ9 sanity.functional and sanity.system on AArch64 Linux and macOS with this change, and the jobs finished successfully.

@knn-k knn-k marked this pull request as ready for review April 18, 2024 22:44
@knn-k knn-k requested a review from 0xdaryl as a code owner April 18, 2024 22:44
@knn-k
Copy link
Contributor Author

knn-k commented Apr 25, 2024

Related but independent: PR #7318

@knn-k knn-k marked this pull request as draft May 2, 2024 04:50
@knn-k knn-k force-pushed the aarch64arraycopy branch from 1c1491b to b9ed15c Compare May 2, 2024 06:43
@knn-k
Copy link
Contributor Author

knn-k commented May 2, 2024

Jenkins build aarch64,amac

@knn-k
Copy link
Contributor Author

knn-k commented May 2, 2024

I updated the code. It is somewhat faster than the previous version on April 18.

@knn-k knn-k marked this pull request as ready for review May 2, 2024 09:55
// x1 - src addr
// x2 - dst addr

// Obsolete entry points to be removed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is preventing you from removing them now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are dependencies in the OpenJ9 side.
I am keeping these entry points for now to avoid coordinated merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened a draft PR eclipse-openj9/openj9#19470.
I am going to remove these entry points from ARM64arrayCopy.spp after the PR above is merged,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened a draft PR #7338 for removing the obsolete entry points.

TR::addDependency(deps, NULL, TR::RealRegister::x3, TR_GPR, cg);
TR::addDependency(deps, NULL, TR::RealRegister::x4, TR_GPR, cg);
TR::addDependency(deps, NULL, TR::RealRegister::v0, TR_FPR, cg);
TR::addDependency(deps, NULL, TR::RealRegister::v1, TR_FPR, cg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it is better to choose less popular registers to trash in the helper (e.g., v30/v31). The reason being that the local register assigner will often choose v0/v1 (won't it?) which may be live across this point, and this increases the likelihood of a conflict that would get resolved by evicting the contents of those registers across this call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.
I updated the code to use v30 and v31 instead of v0 and v1. They appear as q30 and q31 in ARM64arrayCopy.spp.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran OpenJ9 sanity.functional tests with this update in eclipse-openj9/openj9#19470, and got no failures.

This commit improves the performance of arraycopy helpers for AArch64 by
omitting alignment checks.

Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
@knn-k knn-k force-pushed the aarch64arraycopy branch from b9ed15c to 4f14642 Compare May 9, 2024 02:06
@knn-k
Copy link
Contributor Author

knn-k commented May 9, 2024

Jenkins build aarch64,amac

@0xdaryl 0xdaryl merged commit 0331584 into eclipse-omr:master May 15, 2024
@knn-k knn-k deleted the aarch64arraycopy branch May 15, 2024 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants