RFR: 8327652: S390x: Implements SLP support [v6]
Lutz Schmidt
lucy at openjdk.org
Wed Mar 27 11:41:25 UTC 2024
On Wed, 27 Mar 2024 08:27:47 GMT, Sidraya Jayagond <sjayagond at openjdk.org> wrote:
>> src/hotspot/cpu/s390/s390.ad line 1194:
>>
>>> 1192: }
>>> 1193: return size;
>>> 1194: }
>>
>> How about doing the size calculation like
>>
>> if (cbuf) {
>> C2_MacroAssembler _masm(cbuf);
>> int start_off = __ offset();
>> __ z_vlr(Rdst, Rsrc);
>> size += __offset() - start_off;
>> }
>>
>> That way, you are sure to have the correct size. And you only increase the size if you actually emit code.
>
> Thank you @RealLucy for taking a look.
> I have tried your suggestion however some of the jtreg tests are crashing at below line
>
> # Internal Error (output.cpp:1799), pid=846930, tid=846947
> # guarantee((int)(blk_starts[i+1] - blk_starts[i]) >= (current_offset - blk_offset)) failed: shouldn't increase block size
> #
> # JRE version: OpenJDK Runtime Environment (23.0) (build 23-internal-adhoc.root.jdk)
> # Java VM: OpenJDK 64-Bit Server VM (23-internal-adhoc.root.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-s390x)
> # Problematic frame:
> # V [libjvm.so+0x9f8ce6] PhaseOutput::fill_buffer(CodeBuffer*, unsigned int*)+0x153e
Ahh, sorry. Forget this suggestion. Your original code is correct.
There are two modes this code is called. One is to purely find out the size of the to be emitted code. In this case (chuf == nullptr) you have to return the correct size anyway. The other mode is the actual code emit call (chuff != nullptr). The correct size has to be returned here as well.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18162#discussion_r1540885603
More information about the hotspot-dev
mailing list