[jdk21u-dev] RFR: 8320379: C2: Sort spilling/unspilling sequence for better ld/st merging into ldp/stp on AArch64

Andrew Haley aph at openjdk.org
Sat Jun 8 09:07:16 UTC 2024


On Fri, 7 Jun 2024 18:09:35 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> In other words, on this trivial workload, this saves us ~0.15% of code cache. If this holds for larger apps, this amounts at about 192K for 128M code cache. This looks like a benefit enough for the cost of this backport :) It would, of course, impact even higher when we miss `ldp` optimization somewhere near heavy spills on a hot path.

So this is the kind of argument that should have been made.

It's not quite obvious that it'll help a hot path, though. ARMv8.4 made a change that makes LDP and STP atomic in some cases (see "Changes to single-copy atomicity in Armv8.4"). While this is very useful, it is a behavioural change. I'm guessing that there won't be any regressions for spills and fills, because stack-local accesses are uncontended.

-------------

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/665#issuecomment-2155883494


More information about the jdk-updates-dev mailing list