Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v8]

2025-04-14 Thread Hamlin Li
On Mon, 14 Apr 2025 06:26:10 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> minors > > test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java line 149: > &g

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v7]

2025-04-11 Thread Hamlin Li
On Fri, 11 Apr 2025 04:07:45 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> enable more test > > src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp line 2173: > >&g

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v8]

2025-04-11 Thread Hamlin Li
0.57 | 118.639 | 119.373 | 0.451 | ns/op | > 1.002 > o.o.b.vm.compiler.IfMinMax.testVectorInt | avgt | 40 | 60130.165 | 60062.303 > | 61839.776 | 61895.194 | 15887.398 | 15924.502 | 15874.835 | 15667.936 | > 101.94 | ns/op | 3.785 > o.o.b.vm.compiler.IfMinMax.testV

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v5]

2025-04-10 Thread Hamlin Li
0.57 | 118.639 | 119.373 | 0.451 | ns/op | > 1.002 > o.o.b.vm.compiler.IfMinMax.testVectorInt | avgt | 40 | 60130.165 | 60062.303 > | 61839.776 | 61895.194 | 15887.398 | 15924.502 | 15874.835 | 15667.936 | > 101.94 | ns/op | 3.785 > o.o.b.vm.compiler.IfMinMax.testV

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v7]

2025-04-10 Thread Hamlin Li
0.57 | 118.639 | 119.373 | 0.451 | ns/op | > 1.002 > o.o.b.vm.compiler.IfMinMax.testVectorInt | avgt | 40 | 60130.165 | 60062.303 > | 61839.776 | 61895.194 | 15887.398 | 15924.502 | 15874.835 | 15667.936 | > 101.94 | ns/op | 3.785 > o.o.b.vm.compiler.IfMinMax.testVectorLong

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v6]

2025-04-10 Thread Hamlin Li
0.57 | 118.639 | 119.373 | 0.451 | ns/op | > 1.002 > o.o.b.vm.compiler.IfMinMax.testVectorInt | avgt | 40 | 60130.165 | 60062.303 > | 61839.776 | 61895.194 | 15887.398 | 15924.502 | 15874.835 | 15667.936 | > 101.94 | ns/op | 3.785 > o.o.b.vm.compiler.IfMinMax.testVectorLong | av

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v4]

2025-04-10 Thread Hamlin Li
0.57 | 118.639 | 119.373 | 0.451 | ns/op | > 1.002 > o.o.b.vm.compiler.IfMinMax.testVectorInt | avgt | 40 | 60130.165 | 60062.303 > | 61839.776 | 61895.194 | 15887.398 | 15924.502 | 15874.835 | 15667.936 | > 101.94 | ns/op | 3.785 > o.o.b.vm.compiler.IfMinMax.testVectorLong | avgt |

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v3]

2025-04-10 Thread Hamlin Li
On Wed, 9 Apr 2025 06:52:26 GMT, Fei Yang wrote: >> This is to not enable Zicond automatically, but user can still turn it on >> manually if they want to try or make sure it bring benefit on the specific >> hardware. >> Currently it's based on bananapi result, so maybe in the future we should

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v3]

2025-04-10 Thread Hamlin Li
0.57 | 118.639 | 119.373 | 0.451 | ns/op | > 1.002 > o.o.b.vm.compiler.IfMinMax.testVectorInt | avgt | 40 | 60130.165 | 60062.303 > | 61839.776 | 61895.194 | 15887.398 | 15924.502 | 15874.835 | 15667.936 | > 101.94 | ns/op | 3.785 > o.o.b.vm.compiler.IfMinMax.testVectorLong | avgt |

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L

2025-04-09 Thread Hamlin Li
On Wed, 9 Apr 2025 06:41:51 GMT, Fei Yang wrote: > Sorry for not being clear enough. I am suggesting this: if (UseZicond) { FLAG_SET_DEFAULT(ConditionalMoveLimit, 3); } I think this depends on whether we should enable ConditionalMoveLimit based on `UseZicond`? So, I'll leave it until

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v2]

2025-04-09 Thread Hamlin Li
0.57 | 118.639 | 119.373 | 0.451 | ns/op | > 1.002 > o.o.b.vm.compiler.IfMinMax.testVectorInt | avgt | 40 | 60130.165 | 60062.303 > | 61839.776 | 61895.194 | 15887.398 | 15924.502 | 15874.835 | 15667.936 | > 101.94 | ns/op | 3.785 > o.o.b.vm.compiler.IfMinMax.testVectorLong |

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v2]

2025-04-09 Thread Hamlin Li
On Tue, 8 Apr 2025 15:02:27 GMT, Feilong Jiang wrote: >> Hamlin Li has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains five

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L

2025-04-08 Thread Hamlin Li
On Mon, 7 Apr 2025 14:23:52 GMT, Hamlin Li wrote: > Hi, > Can you help to review this patch? > On riscv, CMoveI/L already were implemented, but there are some gap: > 1. CMoveI/L does not support comparison with float/double, corresponding > tests are not turn on either. > 2.

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L

2025-04-08 Thread Hamlin Li
On Tue, 8 Apr 2025 07:07:12 GMT, Fei Yang wrote: > Maybe we should check UseZicond and only enable UseCMoveUnconditionally & > ConditionalMoveLimit conditionally? Not sure what do you mean here. > I don't see how enabling CMove will bring us any performance benefit without > Zicond. It's done

RFR: 8352504: RISC-V: implement and enable CMoveI/L

2025-04-07 Thread Hamlin Li
Hi, Can you help to review this patch? On riscv, CMoveI/L already were implemented, but there are some gap: 1. CMoveI/L does not support comparison with float/double, corresponding tests are not turn on either. 2. Some optimization of C2 is not turned on, e.g. `Phi -> CMove -> min_max`. 3. lack of

Re: RFR: 8352730: RISC-V: Disable tests in qemu-user [v2]

2025-03-27 Thread Hamlin Li
On Thu, 27 Mar 2025 14:32:18 GMT, Robbin Ehn wrote: >> Hi, for you to consider. >> >> These tests constantly fails in qemu-user. >> Either the require host to be same arch or they are very very slow in >> emulation. >> E.g. "ptrace(PTRACE_ATTACH, ..) failed for 405157: Function not >> implemen

Re: RFR: 8352730: RISC-V: Disable tests in qemu-user [v2]

2025-03-27 Thread Hamlin Li
On Thu, 27 Mar 2025 14:32:18 GMT, Robbin Ehn wrote: >> Hi, for you to consider. >> >> These tests constantly fails in qemu-user. >> Either the require host to be same arch or they are very very slow in >> emulation. >> E.g. "ptrace(PTRACE_ATTACH, ..) failed for 405157: Function not >> implemen

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v11]

2025-01-23 Thread Hamlin Li
>const_oop() == nullptr) { >> >> Hi, this is not a review comment. >> Just curious, to continue the following code path why does `box_type` must >> have a valid `const_oop`? > > @Hamlin-Li , Class types are passed as constant oop, this check is added for > argum

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v11]

2025-01-23 Thread Hamlin Li
On Fri, 17 Jan 2025 16:02:55 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch adds C2 compiler support for various Float16 operations added by >> [PR#22128](https://github.com/openjdk/jdk/pull/22128) >> >> Following is the summary of changes included with this patch:- >> >> 1. Detection

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v11]

2025-01-23 Thread Hamlin Li
On Fri, 17 Jan 2025 16:02:55 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch adds C2 compiler support for various Float16 operations added by >> [PR#22128](https://github.com/openjdk/jdk/pull/22128) >> >> Following is the summary of changes included with this patch:- >> >> 1. Detection

Re: RFR: 8346706: RISC-V: Add available registers to hs_err [v4]

2025-01-09 Thread Hamlin Li
On Tue, 7 Jan 2025 13:07:03 GMT, Robbin Ehn wrote: >> Hi please consider. >> >> This adds below to hs_err: >> >> Floating point state: >> fcsr=1 >> Floating point registers: >> f0=0x44a72000 | 1.84467e+19 >> f1=0x44a72000 | 1.84467e+19 >> >> f31=0x44a72000 | 1.84467

Re: RFR: 8346706: RISC-V: Add available registers to hs_err

2024-12-20 Thread Hamlin Li
On Fri, 20 Dec 2024 11:17:54 GMT, Robbin Ehn wrote: > Hi please consider. > > This adds below to hs_err: > > Floating point state: > fcsr=1 > Floating point registers: > f0=0x44a72000 | 1.84467e+19 > f1=0x44a72000 | 1.84467e+19 > > f31=0x44a72000 | 1.84467e+19 > >

Re: RFR: 8345799: Update copyright year to 2024 for core-libs in files where it was missed [v3]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 15:42:57 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Re: RFR: 8345799: Update copyright year to 2024 for core-libs in files where it was missed [v3]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 15:42:57 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Re: RFR: 8345799: Update copyright year to 2024 for core-libs in files where it was missed [v3]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 15:42:57 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Re: RFR: 8345799: Update copyright year to 2024 for core-libs in files where it was missed [v3]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 15:42:57 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Re: RFR: 8345799: Update copyright year to 2024 for core-libs in files where it was missed [v3]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 15:42:57 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Re: RFR: 8345799: Update copyright year to 2024 for core-libs in files where it was missed [v3]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 15:42:57 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Re: RFR: 8345805: Update copyright year to 2024 for other files where it was missed [v2]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 21:02:03 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Re: RFR: 8345805: Update copyright year to 2024 for other files where it was missed [v2]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 21:02:03 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Re: RFR: 8345805: Update copyright year to 2024 for other files where it was missed [v2]

2024-12-11 Thread Hamlin Li
On Mon, 9 Dec 2024 21:02:03 GMT, Magnus Ihse Bursie wrote: >> Some files have been modified in 2024, but the copyright year has not been >> properly updated. This should be fixed. >> >> I have located these modified files using: >> >> git log --since="Jan 1" --name-only --pretty=format: | sor

Integrated: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF

2024-11-04 Thread Hamlin Li
On Mon, 14 Oct 2024 14:57:46 GMT, Hamlin Li wrote: > Hi, > Can you help to review the patch? Previously it's > https://github.com/openjdk/jdk/pull/18605. > This pr is based on https://github.com/openjdk/jdk/pull/20781. > > Thanks! > > ## Test > ### tests: &

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-11-04 Thread Hamlin Li
On Tue, 22 Oct 2024 09:28:36 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review the patch? Previously it's >> https://github.com/openjdk/jdk/pull/18605. >> This pr is based on https://github.com/openjdk/jdk/pull/20781. >> >> Thanks! >> >&

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-11-04 Thread Hamlin Li
On Fri, 1 Nov 2024 11:01:24 GMT, Andrew Haley wrote: > Here are my results, Apple M1. Pretty similar to what we've seen, but no SVE. > > Looks good. Thank you so much for testing! - PR Comment: https://git.openjdk.org/jdk/pull/21502#issuecomment-2454181484

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v51]

2024-10-25 Thread Hamlin Li
On Thu, 24 Oct 2024 14:05:40 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v51]

2024-10-24 Thread Hamlin Li
On Thu, 24 Oct 2024 14:05:40 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8327624: Remove VM implementation that bypass verification for core reflection [v2]

2024-10-22 Thread Hamlin Li
On Thu, 17 Oct 2024 22:44:05 GMT, Mandy Chung wrote: >> The old core reflection implementation generates dynamic classes that are >> special cases in the VM to bypass bytecode verification to workaround >> various issues [1] [2] [3]. >> >> The old core reflection implementation was [removed in

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-10-22 Thread Hamlin Li
P_ITER=10;JAVA_OPTIONS=-XX:+UnlockExperimentalVMOptions > -XX:+EnableVectorSupport -XX:+UseVectorStubs' > * -intrinsic: > 'FORK=1;ITER=10;WARMUP_ITER=10;JAVA_OPTIONS=-XX:+UnlockExperimentalVMOptions > -XX:+EnableVectorSupport -XX:-UseVectorStubs' > > ### Performan

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2024-10-22 Thread Hamlin Li
On Mon, 21 Oct 2024 09:53:16 GMT, Fei Gao wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add missing files > > src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 8207: > &

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v43]

2024-10-17 Thread Hamlin Li
On Wed, 16 Oct 2024 13:42:42 GMT, Roman Kennke wrote: >> We're seeing failures in our nightly testing for tests >> runtime/cds/appcds/SharedBaseAddress.java and >> runtime/cds/SharedBaseAddress.java which I'm tracking in this bug >> [JDK-8340212](https://bugs.openjdk.org/browse/JDK-8340212) >>

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v43]

2024-10-17 Thread Hamlin Li
On Wed, 16 Oct 2024 13:42:42 GMT, Roman Kennke wrote: >> We're seeing failures in our nightly testing for tests >> runtime/cds/appcds/SharedBaseAddress.java and >> runtime/cds/SharedBaseAddress.java which I'm tracking in this bug >> [JDK-8340212](https://bugs.openjdk.org/browse/JDK-8340212) >>

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2024-10-16 Thread Hamlin Li
P_ITER=10;JAVA_OPTIONS=-XX:+UnlockExperimentalVMOptions > -XX:+EnableVectorSupport -XX:+UseVectorStubs' > * -intrinsic: > 'FORK=1;ITER=10;WARMUP_ITER=10;JAVA_OPTIONS=-XX:+UnlockExperimentalVMOptions > -XX:+EnableVectorSupport -XX:-UseVectorStubs' > > ### Performan

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2]

2024-10-16 Thread Hamlin Li
On Wed, 16 Oct 2024 12:15:51 GMT, Ludovic Henry wrote: >> src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 8218: >> >>> 8216: >>> 8217: snprintf(ebuf, sizeof(ebuf), "%sdx_%ssve", >>> VectorSupport::mathname[op], ulf); >>> 8218: >>> StubRoutines::_vector_d_math[VectorSupp

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2]

2024-10-15 Thread Hamlin Li
On Tue, 15 Oct 2024 11:04:40 GMT, Magnus Ihse Bursie wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update make/autoconf/flags-cflags.m4 >> >> Co-authored-by: Magnus

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2]

2024-10-15 Thread Hamlin Li
P_ITER=10;JAVA_OPTIONS=-XX:+UnlockExperimentalVMOptions > -XX:+EnableVectorSupport -XX:+UseVectorStubs' > * -intrinsic: > 'FORK=1;ITER=10;WARMUP_ITER=10;JAVA_OPTIONS=-XX:+UnlockExperimentalVMOptions > -XX:+EnableVectorSupport -XX:-UseVectorStubs' > > ### Performan

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v23]

2024-10-15 Thread Hamlin Li
On Thu, 19 Sep 2024 15:01:26 GMT, Hamlin Li wrote: >> Roman Kennke has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'lilliput/JEP-450-temporary-fix-branch-2' >> i

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v23]

2024-10-15 Thread Hamlin Li
On Thu, 19 Sep 2024 15:01:26 GMT, Hamlin Li wrote: >> Roman Kennke has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'lilliput/JEP-450-temporary-fix-branch-2' >> i

RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF

2024-10-15 Thread Hamlin Li
Hi, Can you help to review the patch? Previously it's https://github.com/openjdk/jdk/pull/18605. This pr is based on https://github.com/openjdk/jdk/pull/20781. Thanks! ## Test ### tests: * test/jdk/jdk/incubator/vector/ * test/hotspot/jtreg/compiler/vectorapi/ ### options: * -XX:UseSVE=1 -XX:+E

Withdrawn: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF

2024-10-15 Thread Hamlin Li
On Wed, 3 Apr 2024 14:40:42 GMT, Hamlin Li wrote: > Hi, > Can you help to review the patch? > This pr is based on previous work and discussion in [pr > 16234](https://github.com/openjdk/jdk/pull/16234), [pr > 18294](https://github.com/openjdk/jdk/pull/18294). > * NOTE: This p

Re: RFR: 8341880: RISC-V: riscv_vector.h native build fails with gcc13 after JDK-8320500 [v3]

2024-10-11 Thread Hamlin Li
On Fri, 11 Oct 2024 07:57:48 GMT, SendaoYan wrote: >> Hi all, >> The file >> `src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c` >> introduced by [JDK-8341880](https://bugs.openjdk.org/browse/JDK-8341880) >> native build fails by fedora OS shipped gcc13. >> Gcc13 doesn't hav

Re: RFR: 8341880: RISC-V: riscv_vector.h native build fails with gcc13 after JDK-8320500 [v2]

2024-10-11 Thread Hamlin Li
On Fri, 11 Oct 2024 04:02:53 GMT, SendaoYan wrote: >> Hi all, >> The file >> `src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c` >> introduced by [JDK-8341880](https://bugs.openjdk.org/browse/JDK-8341880) >> native build fails by fedora OS shipped gcc13. >> Gcc13 doesn't hav

Re: RFR: 8341880: RISC-V: riscv_vector.h native build fails with gcc13 after JDK-8320500

2024-10-10 Thread Hamlin Li
On Thu, 10 Oct 2024 14:02:08 GMT, Fei Yang wrote: > FYI: I see they claim LLVM 17+ from the page: That's great, then it should be fine to just check the compiler version and enable `-march=rv64gcv` conditaionally. - PR Comment: https://git.openjdk.org/jdk/pull/21442#issuecomment-2

Re: RFR: 8341880: RISC-V: riscv_vector.h native build fails with gcc13 after JDK-8320500

2024-10-10 Thread Hamlin Li
On Thu, 10 Oct 2024 13:15:42 GMT, Fei Yang wrote: > FYI: I witnessed some different kinds of compile errors about libsleef while > building with GCC version 13.2.0 (Ubuntu 13.2.0-23ubuntu4) shipped with > Ubuntu 24.04.1 LTS riscv64. Seems that GCC-13 doesn't have a good support for > these RVV

Re: RFR: 8341880: RISC-V: riscv_vector.h native build fails with gcc13 after JDK-8320500

2024-10-10 Thread Hamlin Li
On Thu, 10 Oct 2024 07:37:43 GMT, SendaoYan wrote: > Hi all, > The file > `src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c` > introduced by [JDK-8341880](https://bugs.openjdk.org/browse/JDK-8341880) > native build fails by fedora OS shipped gcc13. > Gcc13 doesn't have `__r

Re: RFR: 8341880: RISC-V: riscv_vector.h native build fails with gcc13 after JDK-8320500

2024-10-10 Thread Hamlin Li
On Thu, 10 Oct 2024 07:37:43 GMT, SendaoYan wrote: > Hi all, > The file > `src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c` > introduced by [JDK-8341880](https://bugs.openjdk.org/browse/JDK-8341880) > native build fails by fedora OS shipped gcc13. > Gcc13 doesn't have `__r

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-09 Thread Hamlin Li
On Tue, 8 Oct 2024 14:56:56 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-08 Thread Hamlin Li
On Tue, 8 Oct 2024 14:56:56 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers

Integrated: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-10-08 Thread Hamlin Li
On Thu, 19 Sep 2024 08:32:38 GMT, Hamlin Li wrote: > Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v11]

2024-10-08 Thread Hamlin Li
On Tue, 8 Oct 2024 14:46:02 GMT, Magnus Ihse Bursie wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> make minor > > make/modules/jdk.incubator.vector/Lib.gmk line 53: > >> 51

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v12]

2024-10-08 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v11]

2024-10-08 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Hamlin Li
On Mon, 7 Oct 2024 09:50:16 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Hamlin Li
On Tue, 8 Oct 2024 13:40:53 GMT, Hamlin Li wrote: >> So is the `LIBS` line as well. And the CFLAGS line should be just: >> >>CFLAGS := -march=rv64gcv, \ > > No worries, it's not late. Take care! Do you suggest something like below? EX

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-08 Thread Hamlin Li
On Tue, 8 Oct 2024 13:25:17 GMT, Magnus Ihse Bursie wrote: >> make/modules/jdk.incubator.vector/Lib.gmk line 50: >> >>> 48: DISABLED_WARNINGS_clang := unused-function sign-compare >>> tautological-compare ignored-qualifiers, \ >>> 49: CFLAGS := $(CFLAGS_JDKLIB) -march=rv64gcv, \ >>>

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v9]

2024-10-08 Thread Hamlin Li
On Mon, 7 Oct 2024 09:16:42 GMT, Ludovic Henry wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> bits > 512 > > Marked as reviewed by luhenry (Committer). @luhenry I merged this pr wi

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-10-08 Thread Hamlin Li
On Mon, 23 Sep 2024 13:12:16 GMT, Erik Joelsson wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> modify cflags style > > Build changes look ok. @erikj79 @RealFYang Hi, can you help to

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-07 Thread Hamlin Li
On Mon, 7 Oct 2024 09:50:16 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v10]

2024-10-07 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1.743

Re: RFR: 8334305: Remove all code for nsk.share.Log verbose mode [v3]

2024-10-01 Thread Hamlin Li
On Tue, 1 Oct 2024 07:01:17 GMT, Ramkumar Sunderbabu wrote: >> Cleaning up nsk.share.Log code after the verbose mode was set always true. >> >> Tested all the vmTestbase/ tests. > > Ramkumar Sunderbabu has updated the pull request incrementally with one > additional commit since the last revis

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v9]

2024-09-30 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-30 Thread Hamlin Li
On Mon, 30 Sep 2024 09:01:24 GMT, Ludovic Henry wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix test macro > > src/hotspot/share/opto/vectorIntrinsics.cpp line 2044: > >>

Re: RFR: 8341168: Cleanup dead code after JDK-8322630 [v2]

2024-09-30 Thread Hamlin Li
On Mon, 30 Sep 2024 08:15:51 GMT, Axel Boldt-Christmas wrote: >> [JDK-8322630](https://bugs.openjdk.org/browse/JDK-8322630) / #17495 removed >> the the concept of ICStubs, InlineCache buffers and related safepoints. >> >> There are a handfull of references and auxiliary constructs still in the

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-27 Thread Hamlin Li
On Fri, 27 Sep 2024 08:10:35 GMT, Fei Yang wrote: >> `NDEBUG` is only used in sleefdp.c which is the original sleef code, and we >> don't use that file in jdk directly, in java.base module of jdk it uses >> `DEBUG` but not use `NDEBUG`. >> Based on above information, I think `DEBUG` is better.

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-27 Thread Hamlin Li
On Fri, 27 Sep 2024 02:22:58 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix test macro > > src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c lin

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]

2024-09-26 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1.743

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-26 Thread Hamlin Li
On Thu, 26 Sep 2024 07:54:32 GMT, Hamlin Li wrote: >> Just a bit worried about the fact that manipunating CSR could be very costly >> on RISC-V. Another choice would be adding an assertion about FP rounding >> mode expecting RNE when returning back from the SLEEF routine.

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v7]

2024-09-26 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1.743

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-26 Thread Hamlin Li
On Thu, 26 Sep 2024 02:15:34 GMT, Fei Yang wrote: >> I see sleef code only set frm to RNE, but I'm not quite sure. >> Even if we can make sure current sleef only set frm to RNE, seems to me we >> can not depends on current implement, it could change. Although good news is >> we don't update sle

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-25 Thread Hamlin Li
On Wed, 25 Sep 2024 14:04:35 GMT, Hamlin Li wrote: >> src/hotspot/cpu/riscv/riscv.ad line 10079: >> >>> 10077: match(CallLeafVector); >>> 10078: >>> 10079: effect(USE meth, KILL cr); >> >> I haven't checked the details of `CallLe

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-25 Thread Hamlin Li
On Wed, 25 Sep 2024 02:29:11 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use all arg v regs > > src/hotspot/cpu/riscv/riscv.ad line 10079: > >> 10077: mat

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Hamlin Li
On Tue, 24 Sep 2024 15:12:29 GMT, Fei Yang wrote: >> Yes, sorry what I meant, updated. > > Then why would we put a constraint on the number of supported argument vector > registers here (v8-v15 instead of v8-v23)? Could we just support all of them, > i.e., v8-v23 to comply with the RISC-V psABI

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]

2024-09-24 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1.743 >

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Hamlin Li
On Tue, 24 Sep 2024 03:47:41 GMT, Fei Yang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> refine comment > > src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 6063

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Hamlin Li
On Tue, 24 Sep 2024 05:57:08 GMT, Robbin Ehn wrote: >> src/hotspot/cpu/riscv/riscv.ad line 10078: >> >>> 10076: match(CallLeafVector); >>> 10077: >>> 10078: effect(USE meth); >> >> It's possible for the runtime call to clobber rFlagsReg `cr` (aka `t1`). So >> safer to add `KILL cr` to the

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-24 Thread Hamlin Li
On Tue, 24 Sep 2024 06:59:58 GMT, Fei Yang wrote: >> Note in the RISC-V ELF psABI there is a convention variant for v-regs. >> If you add function attribute riscv_vector_cc it should be used for C/C++. >> (I never tested it) >> v0 = first vector mask argument >> v8-v23 = args/rets >> v1-v7/v24-v

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v5]

2024-09-24 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v3]

2024-09-23 Thread Hamlin Li
On Mon, 23 Sep 2024 16:40:55 GMT, Ludovic Henry wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comment > > src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c line 31:

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v4]

2024-09-23 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1.743

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Hamlin Li
On Mon, 23 Sep 2024 09:09:46 GMT, Ludovic Henry wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> modify cflags style > > src/jdk.incubator.vector/linux/native/libsleef/lib/vecto

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Hamlin Li
On Mon, 23 Sep 2024 07:30:59 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inli

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v3]

2024-09-23 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Hamlin Li
On Fri, 20 Sep 2024 12:34:38 GMT, Erik Joelsson wrote: >> Thanks. I'm sorry too, I'm not familiar with the build system. >> What you expected could be something like below? >> >> diff --git a/make/modules/jdk.incubator.vector/Lib.gmk >> b/make/modules/jdk.incubator.vector/Lib.gmk >> index 5e522

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v2]

2024-09-23 Thread Hamlin Li
| avgt | 10 | 116708.105 | 167.095 | 285764.405 > | 2489.08 | ns/op | 2.449 > Double128Vector.LOG1P | 1024 | avgt | 10 | 115633.302 | 567.7 | 317235.967 | > 1062.848 | ns/op | 2.743 > Double128Vector.POW | 1024 | avgt | 10 | 321655.14 | 36.55 | 560765.066 | > 2669.33 | ns/op | 1.743 >

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Hamlin Li
On Thu, 19 Sep 2024 16:02:36 GMT, Erik Joelsson wrote: >> Thanks, do you mean something like below? I'll fix it. >> >> CFLAGS := $(CFLAGS_JDKLIB) $(C_O_FLAG_HI) -march=rv64gcv, \ > > Sorry, I had to remind myself of how this works. We actually set this as a > separate parameter on the Setup mac

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v23]

2024-09-19 Thread Hamlin Li
On Thu, 19 Sep 2024 12:08:46 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v23]

2024-09-19 Thread Hamlin Li
On Thu, 19 Sep 2024 12:08:46 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Hamlin Li
On Thu, 19 Sep 2024 12:52:59 GMT, Erik Joelsson wrote: >> Hi, >> Can you help to review this patch? >> Thanks! >> >> This patch is based on https://github.com/openjdk/jdk/pull/20781 which added >> the sleef source (in particular the generated sleef inline headers). We use >> sleef api to vecto

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Hamlin Li
On Wed, 18 Sep 2024 13:23:44 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF

2024-09-19 Thread Hamlin Li
On Thu, 19 Sep 2024 08:32:38 GMT, Hamlin Li wrote: > Hi, > Can you help to review this patch? > Thanks! > > This patch is based on https://github.com/openjdk/jdk/pull/20781 which added > the sleef source (in particular the generated sleef inline headers). We use > sleef

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Hamlin Li
On Wed, 18 Sep 2024 13:23:44 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

  1   2   3   4   5   6   >