[lworld] RFR: 8262863: [lworld] C2 should keep track of the oop even if an inline type is returned as fields [v4]

Tobias Hartmann thartmann at openjdk.java.net
Wed Mar 3 15:03:19 UTC 2021


> If an inline type is returned, its fields are passed in registers if possible. The first register (rax) either contains a pointer to the InlineKlass to allow buffering in interpreted or C1 compiled callers or an oop if the inline type has already been buffered. Currently, a C2 compiled caller completely ignores the first register and just uses the field values returned in the other registers.
> 
> With this patch, C2 checks if an oop is returned and keeps track of it to avoid unnecessary re-buffering. This significantly boosts performance of cases were inlining fails and the callee is interpreted, C1 compiled or had to buffer the inline type for another reason (for example, due a store to a non-flattened field/array).
> 
> Thanks,
> Tobias

Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:

  More fixes

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

Changes:
  - all: https://git.openjdk.java.net/valhalla/pull/357/files
  - new: https://git.openjdk.java.net/valhalla/pull/357/files/4a9925d3..d49d3f24

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=357&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=357&range=02-03

  Stats: 8 lines in 3 files changed: 6 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/357.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/357/head:pull/357

PR: https://git.openjdk.java.net/valhalla/pull/357



More information about the valhalla-dev mailing list