RFR: 8259228: Zero: rewrite (put|get)field from if-else chains to switches

Coleen Phillimore coleenp at openjdk.java.net
Thu Jan 7 15:08:54 UTC 2021


On Thu, 7 Jan 2021 13:59:23 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> 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?

The case/label optimization in that file was done for performance way back when, but my comment still applies.  I probably wasn't clear though.  Can you make the code that you broke out into outline functions and just have the call in that case/label function?

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

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


More information about the hotspot-runtime-dev mailing list