RFR: 8349479: C2: when a Type node becomes dead, make CFG path that uses it unreachable [v3]

Vladimir Ivanov vlivanov at openjdk.org
Mon Mar 31 22:03:38 UTC 2025


On Mon, 31 Mar 2025 10:08:54 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> src/hotspot/share/opto/node.cpp line 3134:
>> 
>>> 3132:   size_t len = ss.size() + 1;
>>> 3133:   char* arena_str = NEW_ARENA_ARRAY(igvn->C->comp_arena(), char, len);
>>> 3134:   memcpy(arena_str, ss.base(), len);
>> 
>> Does it make sense to move it into `stringStream::as_string()`? `stringStream::as_string()` already handles resource area and C-heap allocations.
>
> It does make sense. Implemented in new commit. I added a new method and there's some code duplication but it felt better than adding one more optional argument to the existing method. What do you think?

Looks good! I definitely prefer overload-based solution you came up with.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23468#discussion_r2021833681


More information about the hotspot-compiler-dev mailing list