RFR: 8320649: C2: Optimize scoped values [v4]
Emanuel Peter
epeter at openjdk.org
Thu Apr 18 12:31:20 UTC 2024
On Wed, 17 Jan 2024 15:36:34 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> merge fix
>
> src/hotspot/share/opto/node.cpp line 988:
>
>> 986: return res;
>> 987: }
>> 988:
>
> Code duplication warning 😉
> Not sure what is the best solution though.
I think you could remove duplication with a simple "implement" function, that takes a parameter "want_unique". Then if you find the element, and don't want unique, you return. If you are looking for unique, you just continue and check that you don't find it again.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1570458297
More information about the hotspot-compiler-dev
mailing list