[vector] RFR: Enable call devirtualization during post-parse phase
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Tue Jun 9 22:35:51 UTC 2020
http://cr.openjdk.java.net/~vlivanov/panama/vector/late_inline_virtual/webrev.00/
Vector API refactoring broke inlining through virtual calls in some
important scenarios (for example, both dot product and matrix
multiplication samples [1] are affected [1]).
The primary root cause is the delay in intrinsification of vector
operations: unless enough type info is available for receiver during
parsing, the call won't be devirtualized (and hence inlined), but
intrinsification happens during post-parse phase.
However, it turned out that the problem is broader and not specific to
Vector API. It's not enough just to intrinsify vector operations eagerly.
Proposed patch is an experimental implementation of post-parse
devirtualization (virtual-to-direct call transformation) which then
enables post-parse inlining & intrinsification through such calls.
I'll work on upstreaming the optimization separately since it benefits
ordinary Java code as well. Meanwhile, I propose to integrate the
interim version into vectorIntrinsics branch right away to avoid
surprises during performance analysis.
Best regards,
Vladimir Ivanov
[1]
https://github.com/richardstartin/vectorbenchmarks/blob/master/src/main/java/com/openkappa/panama/vectorbenchmarks/
More information about the panama-dev
mailing list