RFR: 8347901: C2 should remove unused leaf / pure runtime calls [v4]
Marc Chevalier
mchevalier at openjdk.org
Tue Jul 8 14:26:29 UTC 2025
On Mon, 7 Jul 2025 08:30:00 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>>
>> typo
>
> src/hotspot/share/opto/divnode.cpp line 1528:
>
>> 1526: bool not_dead = proj_out_or_null(TypeFunc::Control) != nullptr;
>> 1527: if (result_is_unused && not_dead) {
>> 1528: return replace_with_con(igvn, TypeF::make(0.));
>
> Can we replace all the other usages of `ModFloatingNode::replace_with_con` by `TupleNode` and get rid of that method?
Yes, that sounds like a good idea. One still need to build the right `TupleNode`, which takes a bit of code. So in detail, I'd rather replace `replace_with_con` with a function returning the right `TupleNode` to be as concise on the call-site.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25760#discussion_r2192669986
More information about the graal-dev
mailing list