RFR(M): 8170991: PPC64: Bad code for initialization of short arrays
Gustavo Serra Scalet
gustavo.scalet at eldorado.org.br
Mon Dec 12 16:50:20 UTC 2016
Hello Martin,
I checked the changes and I actually noticed that there were slightly more loading zeroes to a register followed by a store (of that zero) than without your patch. That doesn't say much about performance, but I would say that, on that point of view, it didn't make the code smarter.
In short, it didn't help the issue I was looking at.
Thanks for cc'ing me so I could take a closer look.
> -----Original Message-----
> From: Doerr, Martin [mailto:martin.doerr at sap.com]
> Sent: sexta-feira, 9 de dezembro de 2016 15:01
> To: 'hotspot-compiler-dev at openjdk.java.net' <hotspot-compiler-
> dev at openjdk.java.net>; Gustavo Serra Scalet
> <gustavo.scalet at eldorado.org.br>
> Subject: RFR(M): 8170991: PPC64: Bad code for initialization of short
> arrays
>
> Hello everybody,
>
>
>
> the new flag "InitArrayShortSize" was set to 8 on PPC64. However, this
> leads to bad code. PPC64's C2 compiler currently does not have dedicated
> match rules to store 0.
>
> Unfortunately, loading of the constant 0 got rematerialized many times
> in some cases consuming more registers and code space than needed.
>
>
>
> An attempt to improve initialization was
>
> 8170094: PPC64: Keep immediate value 0 cached into a register to improve
> performance
>
> but this approach has disadvantages and we had decided against it.
>
>
>
> It is possibly to implement special ClearArray nodes to improve the
> initialization of arrays only:
>
> http://cr.openjdk.java.net/~mdoerr/8170991_PPC64_ClearArray/webrev.00/
>
>
>
> Please review.
>
>
>
> @Gustavo: Maybe this improves your test cases, too?
>
>
>
> Best regards,
>
> Martin
>
>
More information about the hotspot-compiler-dev
mailing list