-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Intrinsic for AArch64 Arrays.fill(array, constant) #10207
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
Conversation
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.
Thanks for keeping up this work! I left some high-level comments for now. I'll do some testing and a more thorough review of the assembly code soon.
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/asm/aarch64/AArch64Assembler.java
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/core/aarch64/AArch64LIRGenerator.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/core/aarch64/AArch64LIRGenerator.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/stubs/IntrinsicStubs.java
Outdated
Show resolved
Hide resolved
.../src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/StandardGraphBuilderPlugins.java
Outdated
Show resolved
Hide resolved
.../src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/StandardGraphBuilderPlugins.java
Outdated
Show resolved
Hide resolved
.../src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/StandardGraphBuilderPlugins.java
Outdated
Show resolved
Hide resolved
.../src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/StandardGraphBuilderPlugins.java
Outdated
Show resolved
Hide resolved
@gergo- - I believe I've addressed all your comments so far. Please, let me know if you have any other concerns. |
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.
I added some requests for improved documentation, and the value to be filled should be a long
throughout. I also started some checks on this PR, note that the style checks had some complaints. Please make sure mx checkstyle
passes in the compiler
suite.
This will soon be ready for internal testing.
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/aarch64/AArch64ArrayFillOp.java
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/aarch64/AArch64ArrayFillOp.java
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/aarch64/AArch64ArrayFillOp.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/aarch64/AArch64ArrayFillOp.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/nodes/ArrayFillNode.java
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/nodes/ArrayFillNode.java
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/nodes/ArrayFillNode.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/nodes/ArrayFillNode.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/nodes/ArrayFillNode.java
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/nodes/ArrayFillNode.java
Show resolved
Hide resolved
@gergo- - Please take a look again when you have some time. I've addressed your latest feedback. |
Thanks @JohnTortugo, I've started some tests and will try to take a detailed look at the code in the next few days. |
@JohnTortugo in the meantime, please take a look at the failing tests at https://github.com/oracle/graal/actions/runs/12700274525/job/35582509603?pr=10207 |
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.
Looks pretty good now, thanks! I'll start internal testing and ask another pair of eyes for another look.
Please squash all your commits into one and force-push onto this branch. Unlike the JDK's GitHub repository, ours does not automatically squash on merge.
...ler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/replacements/test/ArraysFillTest.java
Outdated
Show resolved
Hide resolved
...c/jdk.graal.compiler.test/src/jdk/graal/compiler/replacements/test/ArraysFillTestConfig.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/aarch64/AArch64ArrayFillOp.java
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/aarch64/AArch64ArrayFillOp.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/nodes/ArrayFillNode.java
Outdated
Show resolved
Hide resolved
db73964
to
62de2be
Compare
Done. Thank you for reviewing! |
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/stubs/IntrinsicStubs.java
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/replacements/nodes/ArrayFillNode.java
Outdated
Show resolved
Hide resolved
233ca82
to
78be9de
Compare
I addressed latest comments, squashed all commits and force pushed again. |
0099aaf
to
9655ec3
Compare
Thanks for the latest changes, @JohnTortugo . Internal tests mostly pass but there is one error that I need to look into, I'll keep you posted. |
Tests look good, I needed a small internal adjustment in our EE code. I'll assign extra reviewers as required by our policies, then hopefully we can merge this soon. |
Thank you @gergo- ! |
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/aarch64/AArch64ArrayFillOp.java
Outdated
Show resolved
Hide resolved
All comments addressed. Looking forward to merge this! |
0193148
to
60109a4
Compare
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.
Thanks again for all this work, this PR is in the merge queue.
Please, consider this patch to intrinsify
Arrays.fill(array, constant)
forbyte
,short
andint
on AArch64 backend. The assembly code is a port of the HotSpot assembly for the same intrinsic. Thank you @gergo- for reviewing the draft version of this PR!The below is a summary of some quick JMH tests that I ran on my dev machine.