RFR: 8347555: [REDO] C2: implement optimization for series of Add of unique value [v14]
Kangcheng Xu
kxu at openjdk.org
Mon Apr 14 21:40:56 UTC 2025
On Thu, 10 Apr 2025 20:58:23 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Kangcheng Xu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix typo: lhs->rhs
>
> src/hotspot/share/utilities/globalDefinitions.hpp line 1278:
>
>> 1276: JAVA_INTEGER_SHIFT_BASIC_TYPE(java_shift_right)
>> 1277: JAVA_INTEGER_SHIFT_BASIC_TYPE(java_shift_right_unsigned)
>> 1278:
>
> Couldn't this be written as a template, so we could use java_shift_left<T_INT>(x,y) or java_shift_left<jint>(x.y)?
Explicit `BasicType` as a function (instead of template) parameter allows more flexibility at runtime when `bt` is a variable. For example:
https://github.com/openjdk/jdk/blob/e9b42dcce268f32bd2ec3c01ac6221073b888538/src/hotspot/share/opto/addnode.cpp#L471
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23506#discussion_r2042981441
More information about the hotspot-compiler-dev
mailing list