RFR: 8350485: C2: factor out common code in Node::grow() and Node::out_grow()
Emanuel Peter
epeter at openjdk.org
Mon Mar 10 10:58:27 UTC 2025
On Fri, 7 Mar 2025 13:36:58 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Node:grow() and Node::out_grow() are copy-pasted from each other and their core logic could be factored out into a third function or at least cleaned up. Hence,the fix includes a function Node::array_resize() that implements the core logic of Node::grow() and Node::out_grow().
>>
>> Link to Github action which had no failures : https://github.com/sarannat/jdk/actions/runs/13677508359
>
> src/hotspot/share/opto/node.hpp line 340:
>
>> 338: // Resize input or output array to grow it the next larger power-of-2 bigger
>> 339: // than len.
>> 340: void resize_array(Node **&array, node_idx_t &max_size, uint len, bool is_in);
>
> Suggestion:
>
> void resize_array(Node**& array, node_idx_t &max_size, uint len, bool is_in);
>
> Nit code style ;)
What does `is_in` mean here? Feel free to give it a longer more expressive name ;)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23928#discussion_r1985081817
More information about the hotspot-compiler-dev
mailing list