RFR: 8330851: C2: More efficient TypeFunc creation
Amit Kumar
amitkumar at openjdk.org
Sat Nov 16 05:08:12 UTC 2024
On Sat, 16 Nov 2024 02:08:26 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> Types are allocated in C2 type arena, so what confused me at first was the lifetime of allocated instances. Unless they live in shared arena, it's not safe to cache them. It would be helpful to assert that during initialization.
For now there are two assert which I included:
`assert(_multianewarray4_tf == nullptr, "should be called once only");` which will be be in the `*_init()` method. and `assert(_multianewarray4_tf != nullptr, "should be initialized");` which is do null-check before returning the object. Is there some arena-specific check that exists, which could be used here ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21782#issuecomment-2480406136
More information about the hotspot-compiler-dev
mailing list