RFR: 8330851: C2: More efficient TypeFunc creation [v5]
Vladimir Ivanov
vlivanov at openjdk.org
Tue Dec 3 03:34:41 UTC 2024
On Fri, 29 Nov 2024 01:15:18 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:
>
> test fix
src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp line 438:
> 436:
> 437: const TypeFunc* ShenandoahBarrierSetC2::write_ref_field_pre_Type() {
> 438: return OptoRuntime::write_ref_field_pre_Type();
Please, keep them local to `ShenandoahBarrierSetC2`. Otherwise, you need to guard it with `INCLUDE_SHENANDOAHGC` there.
src/hotspot/share/opto/runtime.cpp line 195:
> 193: // #undef gen
> 194:
> 195: const TypeFunc* OptoRuntime::_new_instance_tf = nullptr;
Please, use `*_Type` pattern to name `TypeFunc` caches.
src/hotspot/share/opto/runtime.cpp line 2114:
> 2112: }
> 2113:
> 2114: void OptoRuntime::initialize_types() {
For non-C2 runtime stubs, please, turn factories into local static functions and directly initialize cache fields in `OptoRuntime::initialize_types()`.
As an example: https://github.com/openjdk/jdk/commit/c343b56249f223a72cef4671cd5de15406387e3d
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21782#discussion_r1866978354
PR Review Comment: https://git.openjdk.org/jdk/pull/21782#discussion_r1866983988
PR Review Comment: https://git.openjdk.org/jdk/pull/21782#discussion_r1866986028
More information about the hotspot-compiler-dev
mailing list