RFR: 8255397: x86: coalesce reference and int entry points into vtos bytecodes [v2]

Aleksey Shipilev shade at openjdk.java.net
Wed Oct 28 11:14:15 UTC 2020


On Wed, 28 Oct 2020 11:11:19 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> On x86 - both 32- and 64-bit - the code laid out for transitionining into a vtos bytecode when having a reference and int top-of-stack state is semantically identical, and can be coalesced.
>> 
>> This patch removes a short jump on some cases which is marginally beneficial when interpreting, while measurably reducing overhead of generating the interpreter itself.
>
> Claes Redestad has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - Drop verification from comment
>  - Introduce push_i_or_ptr
>  - Merge branch 'master' into atos_itos_opt
>  - x86: coalesce some ptr and int entry points

Changes requested by shade (Reviewer).

src/hotspot/cpu/x86/interp_masm_x86.cpp line 609:

> 607: 
> 608: void InterpreterMacroAssembler::push_i_or_ptr(Register r) {
> 609:   push_i(r);

Should be `push(r)`: it is both cleaner and avoids a middle call to `push_i(r)`.

src/hotspot/cpu/x86/interp_masm_x86.hpp line 152:

> 150:   // an int might have some advantage, while still documenting the fact that a
> 151:   // ptr might be pushed to the stack. This method will never do any
> 152:   // verification of the oop.

I don't think we need to mention verification here.

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

PR: https://git.openjdk.java.net/jdk/pull/865


More information about the hotspot-dev mailing list