RFR: 8330851: C2: More efficient TypeFunc creation [v2]

Vladimir Ivanov vlivanov at openjdk.org
Thu Nov 28 01:25:48 UTC 2024


On Sun, 24 Nov 2024 09:18:52 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

>> Lazy computation of TypeFunc.
>> 
>> Testing: Tier1 on Fastdebug & Release VMs (`s390x architecture`)
>
> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   refactor

FYI I played a bit with template functions as TypeFunc factories [1]. Overall, it looks promising. I'm perfectly fine to cover that in a follow-up PR, but it would be good to align this patch accordingly.

Some observations follow:

(1) There's a bunch of other TypeFunc usages you may want to cover.

(2) It turns out there are 2 types of `TypeFunc`s declared on OptoRuntime: those related to OptoRuntime stubs (populated by `C2_STUBS_DO`) and adhoc types for generated stubs and runtime calls. For the former a dedicated init method colocated with runtime entry looks preferred (`*_Type_Init()`) since both representations can be easily compared. For the former, an inline construction in `OptoRuntime::initialize_types()` looks more appropriate. 

[1] https://github.com/openjdk/jdk/compare/pr/21782...iwanowww:jdk:pr/21782

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

PR Comment: https://git.openjdk.org/jdk/pull/21782#issuecomment-2505088404


More information about the hotspot-compiler-dev mailing list