RFR: 8286972: Support the new loop induction variable related PopulateIndex IR node on x86
Vladimir Kozlov
kvn at openjdk.java.net
Wed May 18 23:55:34 UTC 2022
On Wed, 18 May 2022 17:25:38 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
> This PR adds x86 backend support for the new loop induction variable related PopulateIndex IR node.
> This IR node was added as part of [JDK-8280510](https://bugs.openjdk.java.net/browse/JDK-8280510).
>
> The performance numbers are as follows:
> Before:
> Benchmark (count) Mode Cnt Score Error Units
> IndexVector.exprWithIndex1 65536 thrpt 3 64556.552 ± 1126.396 ops/s
> IndexVector.exprWithIndex2 65536 thrpt 3 22117.050 ± 11452.098 ops/s
> IndexVector.indexArrayFill 65536 thrpt 3 117776.383 ± 1120.957 ops/s
>
> After:
> Benchmark (count) Mode Cnt Score Error Units
> IndexVector.exprWithIndex1 65536 thrpt 3 203180.290 ± 2147.807 ops/s
> IndexVector.exprWithIndex2 65536 thrpt 3 274132.756 ± 6853.393 ops/s
> IndexVector.indexArrayFill 65536 thrpt 3 374165.202 ± 46930.779 ops/s
>
> Please review.
>
> Best Regards,
> Sandhya
src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 2282:
> 2280: bool is_bw_supported = VM_Version::supports_avx512bw();
> 2281: if (is_bw && !is_bw_supported) {
> 2282: assert(vlen_enc != Assembler::AVX_512bit, "required");
What are acceptable values of `vlen_enc`?
src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 2314:
> 2312: } else {
> 2313: assert(vlen_enc != Assembler::AVX_512bit, "required");
> 2314: assert((dst->encoding() < 16),"XMM register should be 0-15");
The `} else {` case will be also executed on on KNL CPU. Did you tested with `-XX:+UseKNLSetting`?
src/hotspot/cpu/x86/x86.ad line 1475:
> 1473: return false;
> 1474: }
> 1475: // fallthrough
Please, don't do `fallthrough` - `RoundVF` is not related to `PopulateIndex`. Why not `if (!is_LP64 || UseAVX < 2)`?
Are there limitations in 32 bits or you don't want spend time on not major platform (which is also understandable)?
src/hotspot/cpu/x86/x86.ad line 1821:
> 1819: case Op_PopulateIndex:
> 1820: if (size_in_bits > 256 && !VM_Version::supports_avx512bw())
> 1821: return false;
Use `{}` according to our style.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8778
More information about the hotspot-compiler-dev
mailing list