RFR: 8347901: C2 should remove unused leaf / pure runtime calls [v2]
Emanuel Peter
epeter at openjdk.org
Fri Jun 20 13:48:31 UTC 2025
On Fri, 20 Jun 2025 08:10:54 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> src/hotspot/share/opto/multnode.hpp line 113:
>>
>>> 111: const TypeTuple* _tf;
>>> 112:
>>> 113: template <typename... NN>
>>
>> Does this need to be a template? Or would a type like `Node*` or `Node` suffice?
>
> The point is that it's a variadic template. Of course, ideally, I'd like it to be a pack of `Node*` but there isn't a simple way to write that. The upside is that one can write `TupleNode::make(some_type, input1, input2, input3, input4)` with how many input you want in a single construction. I prefer hiding the not nice here, to have compact and readable usages of TupleNode, rather than having every usage look like
>
> TupleNode* tuple = new TupleNode(some_type);
> tuple.set_req(0, input1);
> tuple.set_req(1, input2);
> tuple.set_req(2, input3);
> tuple.set_req(3, input4);
Yes, it looks good enough :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25760#discussion_r2159042194
More information about the graal-dev
mailing list