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

Tobias Hartmann thartmann at openjdk.java.net
Thu Sep 9 13:02:16 UTC 2021

On Thu, 9 Sep 2021 08:31:42 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> 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

Thanks for the review, Vladimir!


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

More information about the valhalla-dev mailing list