RFR: 8347901: C2 should remove unused leaf / pure runtime calls [v4]
Tobias Hartmann
thartmann at openjdk.org
Tue Jul 8 15:19:44 UTC 2025
On Tue, 8 Jul 2025 14:21:20 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> 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.
Yes, that sounds good.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25760#discussion_r2192809839
More information about the graal-dev
mailing list