Limitations of the Calling Convention Optimization

Tobias Hartmann tobias.hartmann at oracle.com
Fri Oct 23 07:40:44 UTC 2020


Hi Brian,

On 21.10.20 20:25, Brian Goetz wrote:
> Let's try and invert the question.  Rather than beating up the JIT guys with "Y U no scalarize",
> let's ask: what information would the JIT need (and _when_) in order to routinely scalarize methods
> like this?

With the current implementation, we would need the following information to scalarize interface
arguments and returns:
- A signal to load the type at method link time (John already elaborated on this [1]) and the
information that it's a sealed interface with a single inline type implementor which also needs to
be loaded.
- A guarantee that the argument/return is null free OR the expectation that passing null will be
slow (deoptimization -> execution in the interpreter).

Best regards,
Tobias

[1] https://mail.openjdk.java.net/pipermail/valhalla-dev/2020-October/008141.html



More information about the valhalla-dev mailing list