[CAUTION] RE: RFR(xs): 8222271: [s390] optimize register usage in C2 instruction forms for clearing arrays

Schmidt, Lutz lutz.schmidt at sap.com
Tue Apr 16 09:52:20 UTC 2019


Hi Richard, 

your change looks good. Please note that I am NOT a reviewer.

Thanks for detecting and fixing this inefficiency.

Regards,
Lutz

On 15.04.19, 17:56, "hotspot-compiler-dev on behalf of Reingruber, Richard" <hotspot-compiler-dev-bounces at openjdk.java.net on behalf of richard.reingruber at sap.com> wrote:

    Thanks Martin.
    
    Cheers, Richard.
    
    -----Original Message-----
    From: Doerr, Martin 
    Sent: Montag, 15. April 2019 17:50
    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,
    
    thanks for the update. Looks good. I can push it after you got a 2nd review.
    
    Best regards,
    Martin
    
    
    -----Original Message-----
    From: Reingruber, Richard 
    Sent: Montag, 15. April 2019 17:41
    To: Doerr, Martin <martin.doerr 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 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