RFR: 8347901: C2 should remove unused leaf / pure runtime calls [v2]

Emanuel Peter epeter at openjdk.org
Mon Jun 23 09:22:31 UTC 2025


On Mon, 23 Jun 2025 07:56:25 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> Also, you should probably call `CallLeafPureNode::Ideal` instead of duplicating its logic here and in other subclasses.
>
> In an earlier issue ([JDK-8349523](https://bugs.openjdk.org/browse/JDK-8349523)), I tried to remove these nodes during parsing. It didn't work well. The problem is that it's transformed by GVN before setting any output projection, so of course, the node is removing itself before having the opportunity of being used. We wait until usages have been set before we try to remove the node (or replace it with a tuple).

That sounds like a bug at the use-site... don't you think?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25760#discussion_r2161129339


More information about the graal-dev mailing list