RFR: 8310264: In PhaseChaitin::Split defs and phis are leaked [v4]

Johan Sjölen jsjolen at openjdk.org
Mon Jun 26 11:04:09 UTC 2023


On Mon, 26 Jun 2023 10:54:58 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> src/hotspot/share/opto/reg_split.cpp line 575:
>> 
>>> 573:   // Keep track of DEFS & Phis for later passes
>>> 574:   Node_List defs{split_arena, 8};
>>> 575:   Node_List phis{split_arena, 16};
>> 
>> Why do you use aggregate initialization instead of constructor invocation here?
>
> This will call the constructor, and has since C++11 I believe.  However, I'm clearly being inconsistent here and with the VectorSet change above. There's no reason that I picked brace initializer other than it being the 'modern' way: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list
> 
> I'll revert this change and use regular parens to be more stylistically consistent.

Looking at https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md "uniform initialization", it's OK to use.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14530#discussion_r1242007985


More information about the hotspot-compiler-dev mailing list