RFR: 8347901: C2 should remove unused leaf / pure runtime calls [v2]
Emanuel Peter
epeter at openjdk.org
Fri Jun 20 15:37:31 UTC 2025
On Fri, 20 Jun 2025 07:45:30 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> src/hotspot/share/opto/callnode.cpp line 1306:
>>
>>> 1304:
>>> 1305: //=============================================================================
>>> 1306: bool CallLeafPureNode::is_unused() const {
>>
>> Can you add a quick comment why this check implies that the node is not used, i.e. what that means?
>
> I think i'll need you to explain to me what is unclear at the moment. When I read the function, I see:
> "A CallLeafPure is unused iff there is no output result projection."
>
> I don't see what else to add that is not covered by "if we don't use the result, the pure call is unused", which is exactly the code. Is there any untold hypothesis lurking somewhere that I don't see? It seems to me it uses just very common concepts of C2.
The call could have other uses for other projections. Why does this projection make it unused?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25760#discussion_r2159263096
More information about the graal-dev
mailing list