RFR: 8259228: Zero: rewrite (put|get)field from if-else chains to switches
Coleen Phillimore
coleenp at openjdk.java.net
Wed Jan 6 14:55:55 UTC 2021
On Tue, 5 Jan 2021 10:44:50 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Current handling for (put|get)field uses if-else chain to select the access type. This can be made more uniform by using switches, like accessor_entry code already does.
>
> Additional testing:
> - [x] Ad-hoc Zero performance tests
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1943
More information about the hotspot-runtime-dev
mailing list