RFR: 8330851: C2: More efficient TypeFunc creation [v8]
Vladimir Ivanov
vlivanov at openjdk.org
Fri Jan 10 06:01:50 UTC 2025
On Thu, 9 Jan 2025 05:45:08 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 with a new target base due to a merge or a rebase. The pull request now contains 17 commits:
>
> - Merge branch 'master' into tf_v2
> - fix test case
> - new year
> - fixes code style, restores gc changes
> - [wip] renamed caches, changed type factories, refactored code
> - Merge branch 'master' into tf_v2
> - test fix
> - Merge branch 'master' into tf_v2
> - fixing the merge conflict
> - cover more TypeFunc objects
> - ... and 7 more: https://git.openjdk.org/jdk/compare/a46ae703...22d97e4c
Looks good! Thanks!
> I can follow the same approach I followed for `CallNode` and `ArrayCopyNode` structure, if that would be fine ? I also feel that same change can be done for `CallNode` and `ArrayCopyNode` as they also need their own initializer. I am fine with both, fixing it here or fixing with separate RFE.
Up to you. No strong preferences on my side. I'm fine with the current shape of the patch.
src/hotspot/share/opto/runtime.cpp line 253:
> 251: const TypeFunc* OptoRuntime::_osr_end_Type = nullptr;
> 252: const TypeFunc* OptoRuntime::_register_finalizer_Type = nullptr;
> 253: JFR_ONLY(
For a multi-line case, `#ifdef INCLUDE_JFR` would look better here.
src/hotspot/share/opto/runtime.hpp line 135:
> 133:
> 134: // static TypeFunc* data members
> 135: static const TypeFunc *_new_instance_Type;
Please, spell it as `TypeFunc* `.
src/hotspot/share/opto/runtime.hpp line 193:
> 191: static const TypeFunc *_osr_end_Type;
> 192: static const TypeFunc *_register_finalizer_Type;
> 193: JFR_ONLY(static const TypeFunc *_class_id_load_barrier_Type;)
Same here: `#ifdef INCLUDE_JFR` would look better.
src/hotspot/share/opto/runtime.hpp line 311:
> 309: // ======================================================
> 310:
> 311: static inline const TypeFunc *new_instance_Type() {
Same: please, spell it as `TypeFunc*` (and subsequent declarations).
-------------
Marked as reviewed by vlivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21782#pullrequestreview-2541599232
PR Comment: https://git.openjdk.org/jdk/pull/21782#issuecomment-2581841146
PR Review Comment: https://git.openjdk.org/jdk/pull/21782#discussion_r1909864110
PR Review Comment: https://git.openjdk.org/jdk/pull/21782#discussion_r1909864961
PR Review Comment: https://git.openjdk.org/jdk/pull/21782#discussion_r1909865315
PR Review Comment: https://git.openjdk.org/jdk/pull/21782#discussion_r1909865680
More information about the hotspot-compiler-dev
mailing list