RFR: 8153713 : aarch64: improve short array clearing using store pair
Andrew Haley
aph at redhat.com
Thu Apr 7 15:35:14 UTC 2016
On 04/07/2016 04:01 PM, Felix Yang wrote:
> Please review webrev: http://cr.openjdk.java.net/~fyang/8153713/webrev.00/
> JIRA Issue: https://bugs.openjdk.java.net/browse/JDK-8153713
>
> Currently, C2 compiler generate independent stores to clear
> short arrays whose size is no bigger than parameter
> InitArrayShortSize (refer to ClearArrayNode::Ideal function).
> For the aarch64 port, we have store pair instruction which can
> zero two memory words at a time and this will be good for code
> size and maybe performance for some micro-archs.
>
> For Spark Terasort, an extra of 550 stp (xzr, xzr) instructions
> are generated with the patch, which mean about 2KB reduction in
> codesize.
>
> Tested with JTreg hotspot, langtools and jdk. Is it OK?
It looks reasonable. It's rather a big slab of code for aarch64.ad,
and I think that it should be in MacroAssembler. Long Chen created
MacroAssembler::zero_words, and you should create an overload of
zero_words which takes a constant int as an argument.
Andrew.
More information about the hotspot-compiler-dev
mailing list