RFR: 8179444: AArch64: Put zero_words on a diet

White, Derek Derek.White at cavium.com
Fri May 5 22:54:40 UTC 2017


Hi Andrew,

Really nice seeing the smaller code! I had some questions, observations, and suggestions.

src/cpu/aarch64/vm/macroAssembler_aarch64.cpp:
 - zero_words(reg, reg):
   - Comment mentions that it's used by the ClearArray pattern, but it's also used by generate_fill().
   - The old zero_words(), via block_zero() and fill_words(), would align base to 16-bytes before doing stps, the new code doesn't. It may be worth conditionally pre-aligning if AvoidUnalignedAcesses is true. And could conditionally remove pre-aligning in zero_blocks.

Line  4999: This is pre-existing, but it's confusing - could you rename "ShortArraySize" to "SmallArraySize"?

- zero_words(reg, int):
 - I don't see a great way to handle unaligned accesses without blowing up the code size. So no real request here.
   - It looks like worst case is 15 unaligned stp instructions. 
   - With some benchmarking someday I might argue for calling this constant count version for smaller copies.
   - Unless ClearArray only zero's from the first array element on - then we could guess if base is 16-byte unaligned by looking at the array header size.

-  zero_dcache_blocks():
  - Suggest a new comment that mentions that it's only called from zero_blocks()? Or if it's meant to be more general then add comments about the requirements for base alignment, and that cnt has to be >= 2*zva_length.
  - zero_blocks DOES align base to 16-bytes, so we don't need to check here? Or make it a runtime assert?

Thanks,

 - Derek


-----Original Message-----
From: hotspot-dev [mailto:hotspot-dev-bounces at openjdk.java.net] On Behalf Of Roland Westrelin
Sent: Friday, May 05, 2017 11:59 AM
To: Andrew Haley <aph at redhat.com>; hotspot-dev Source Developers <hotspot-dev at openjdk.java.net>
Subject: Re: RFR: 8179444: AArch64: Put zero_words on a diet


> http://cr.openjdk.java.net/~aph/8179444-2/

Looks ok to me.

Roland.


More information about the hotspot-dev mailing list