RFR(xs): 8222271: [s390] optimize register usage in C2 instruction forms for clearing arrays
Reingruber, Richard
richard.reingruber at sap.com
Mon Apr 15 15:40:52 UTC 2019
Hi Martin,
thanks for looking at this.
> I think the function parameter names "srcL" and "src_len" are confusing (already in current implementation).
> Maybe "tmpL" and "odd_tmp_reg" would be better? What do you think?
You are absolutely right. I've changed the names. This is the new webrev:
http://cr.openjdk.java.net/~rrich/webrevs/2019/8222271/webrev.1/
Thanks, Richard.
-----Original Message-----
From: Doerr, Martin
Sent: Montag, 15. April 2019 14:47
To: Reingruber, Richard <richard.reingruber at sap.com>; hotspot-compiler-dev at openjdk.java.net
Subject: RE: RFR(xs): 8222271: [s390] optimize register usage in C2 instruction forms for clearing arrays
Hi Richard,
your change looks good. Thanks for improving.
I think the function parameter names "srcL" and "src_len" are confusing (already in current implementation).
Maybe "tmpL" and "odd_tmp_reg" would be better? What do you think?
Thanks,
Martin
-----Original Message-----
From: hotspot-compiler-dev <hotspot-compiler-dev-bounces at openjdk.java.net> On Behalf Of Reingruber, Richard
Sent: Montag, 15. April 2019 12:09
To: hotspot-compiler-dev at openjdk.java.net
Subject: [CAUTION] RFR(xs): 8222271: [s390] optimize register usage in C2 instruction forms for clearing arrays
Hi,
please review and sponsor this small enhancement of c2 array clearing on s390.
The c2 instruction forms inlineCallClearArrayConstBig and inlineCallClearArray use the register pair R4,R5 as source operand to a move long extended (mvcle) instruction that clears the destination array.
To do so the source length (R5) is set to 0 and 0 is used for padding. The s390 manual (Principles of Operation[1]) states that if the source length is 0, then the value in the register used for the source address is not changed and no access exceptions for that operand are recognized. In other words: it is completely ignored.
This allows to take any odd register for the source length and to remove the source address operand completely:
Bug: https://bugs.openjdk.java.net/browse/JDK-8222271
Webrev: http://cr.openjdk.java.net/~rrich/webrevs/2019/8222271/webrev/
Thanks, Richard.
[1] https://www.ibm.com/support/libraryserver/download/dz9zr006.pdf#G13.1223008
More information about the hotspot-compiler-dev
mailing list