RFR: 8282722: Regard mapping array in enum switches as stable for constant folding
Joshua Zhu
jzhu at openjdk.java.net
Mon Mar 7 09:19:58 UTC 2022
On Mon, 7 Mar 2022 07:42:23 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Is there a jmh micro-ben to show the perf improvement? Or a jtreg test to show the inlining effect after this patch?
>
> Copyright year in `fieldInfo.hpp` needs to be updated.
>
> Thanks.
Thanks for your comments.
This change is an optimization workable for all enum switches.
Please check the example at http://cr.openjdk.java.net/~jzhu/8282722/
You can check the generated codes or IR graph of function "test2" for differences with/without this change.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7721
More information about the hotspot-dev
mailing list