[lworld] RFR: 8275825: [lworld] Unnecessary buffering because trivial accessor methods are not C2 compiled

Tobias Hartmann thartmann at openjdk.java.net
Tue Oct 26 11:46:51 UTC 2021


Trivial accessor (getter/setter) methods are not C2 compiled but remain at C1 level. This is problematic for methods operating on inline type fields because C1 will not perform scalarization in arguments and returns, leading to frequent buffering. The fix is to not treat these methods as trivial.

The fix also includes some refactoring and a fix to `AdapterFingerPrint::as_basic_args_string` where we hit a `ShouldNotReachHere` when printing basic types of scalarized inline type argument fields because they are not widened.

Thanks to @kuksenko for reporting!

Best regards,
Tobias

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

Commit messages:
 - Test fix
 - 8275825: [lworld] Unnecessary buffering because trivial accessor methods are not C2 compiled

Changes: https://git.openjdk.java.net/valhalla/pull/571/files
 Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=571&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8275825
  Stats: 141 lines in 6 files changed: 114 ins; 11 del; 16 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/571.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/571/head:pull/571

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



More information about the valhalla-dev mailing list