[lworld] RFR: 8273323: [lworld] Fix post-parse call devirtualization with inline type receiver

Tobias Hartmann thartmann at openjdk.java.net
Thu Sep 9 08:38:24 UTC 2021


Post-parse call devirtualization ([JDK-8257211](https://bugs.openjdk.java.net/browse/JDK-8257211)) converts virtual calls to static calls which allows an inline type receiver to be passed as fields and the corresponding buffer allocation to become useless.

Currently, new inline type nodes created during that optimization and also such useless buffer allocations are not removed, leading to missed optimization opportunities and asserts. The problem is that call devirtualization is only executed after macro expansion which removes useless buffer allocations. I've moved the optimization to before macro expansion and added an assert to ensure that we are not missing any optimization opportunities.

I had to cherry-pick the mainline fix for [JDK-8273409](https://bugs.openjdk.java.net/browse/JDK-8273409).

Best regards,
Tobias

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

Commit messages:
 - Added missing record_for_igvn calls, new test and cherry-picked JDK-8273409
 - 8273323: [lworld] Fix post-parse call devirtualization with inline type receiver

Changes: https://git.openjdk.java.net/valhalla/pull/549/files
 Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=549&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273323
  Stats: 83 lines in 5 files changed: 69 ins; 7 del; 7 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/549.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/549/head:pull/549

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


More information about the valhalla-dev mailing list