RFR: 8349523: Unused runtime calls to drem/frem should be removed [v8]
Marc Chevalier
duke at openjdk.org
Mon Mar 3 07:43:42 UTC 2025
On Mon, 3 Mar 2025 07:01:49 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>>
>> address comments
>
> src/hotspot/share/opto/divnode.cpp line 1520:
>
>> 1518: PhaseIterGVN* igvn = phase->is_IterGVN();
>> 1519:
>> 1520: bool result_is_ignored = proj_out_or_null(TypeFunc::Parms) == nullptr;
>
> I think `result_is_unused` might be better wording (same below).
No strong opinion. Done.
> src/hotspot/share/opto/node.cpp line 2948:
>
>> 2946: // `maybe_pure_function` is assumed to be the input of `this`. This is a bit redundant,
>> 2947: // but we already have and need maybe_pure_function in all the call sites, so
>> 2948: // it makes obvious that the `maybe_pure_function` is the same node as in the caller,
>
> Suggestion:
>
> // it makes it obvious that the `maybe_pure_function` is the same node as in the caller,
Done.
> src/hotspot/share/opto/node.cpp line 2952:
>
>> 2950: // the local in the caller.
>> 2951: bool Node::is_data_proj_of_pure_function(const Node* maybe_pure_function) const {
>> 2952: return Opcode() == Op_Proj && static_cast<const ProjNode*>(this)->_con == TypeFunc::Parms && maybe_pure_function->is_pure_function();
>
> You should use `as_Proj()` here instead of the static cast.
Alright! Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23694#discussion_r1977008639
PR Review Comment: https://git.openjdk.org/jdk/pull/23694#discussion_r1977009207
PR Review Comment: https://git.openjdk.org/jdk/pull/23694#discussion_r1977009610
More information about the hotspot-compiler-dev
mailing list