RFR: 8259228: Zero: rewrite (put|get)field from if-else chains to switches
Aleksey Shipilev
shade at openjdk.java.net
Thu Jan 7 14:02:02 UTC 2021
On Wed, 6 Jan 2021 15:28:32 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp line 1669:
>>
>>> 1667: }
>>> 1668: default:
>>> 1669: ShouldNotReachHere();
>>
>> Rather than having a 3000 line case statement in BytecodeInterpreter::run(), can you make these into separate functions? I've always wondered how the C++ optimizer possibly does a good job on this function. And it would be easier to read.
>
> As far as I understand, in "release", that is not really a switch statement, but the goto-machine dispatched through "labels" table holding goto pointers. So it would be an interesting exercise to see if: a) that machine is even needed; b) can it be reasonably done with separate compilation units. None seem apply to this patch, though?
Coleen, that that address your comment?
-------------
PR: https://git.openjdk.java.net/jdk/pull/1943
More information about the hotspot-runtime-dev
mailing list