RFR: 8330851: C2: More efficient TypeFunc creation
Amit Kumar
amitkumar at openjdk.org
Wed Nov 27 06:43:42 UTC 2024
On Mon, 18 Nov 2024 19:15:39 GMT, Dean Long <dlong at openjdk.org> wrote:
>>> For example, new_array_Type() when passes NOTNULL and INT and returns NOTNULL could be represented by something like "NIN".
>>
>> There's definitely some room for improvement here, but, frankly speaking, stringy descriptors don't look appealing to me. Why not simply introduce `TypeFunc` factory methods which explicitly accept argument/return `Type`s instead? Probably, variadic functions are a good fit here, but even if it's not the case, there are rather few arities used (single return value - void, 1 slot, or 2 slots, plus up to 8 arguments). And that would eliminate lots of boilerplate code as well.
>
>> > For example, new_array_Type() when passes NOTNULL and INT and returns NOTNULL could be represented by something like "NIN".
>>
>> There's definitely some room for improvement here, but, frankly speaking, stringy descriptors don't look appealing to me. Why not simply introduce `TypeFunc` factory methods which explicitly accept argument/return `Type`s instead? Probably, variadic functions are a good fit here, but even if it's not the case, there are rather few arities used (single return value - void, 1 slot, or 2 slots, plus up to 8 arguments). And that would eliminate lots of boilerplate code as well.
>
> Good idea.
@dean-long @iwanowww any suggestion for this one ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21782#issuecomment-2503027991
More information about the hotspot-compiler-dev
mailing list