RFR: 8309203: C2: remove copy-by-value of GrowableArray for InterfaceSet [v2]
Roland Westrelin
roland at openjdk.org
Wed Oct 25 15:33:51 UTC 2023
On Wed, 25 Oct 2023 07:39:52 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> Very nice cleanup. I just added a few style comments.
Thanks for reviewing this. All your comments should be addressed now.
> src/hotspot/share/opto/type.cpp line 66:
>
>> 64: { Bad, T_ARRAY, "array:", false, Node::NotAMachineReg, relocInfo::none }, // Array
>> 65:
>> 66: { Bad, T_ARRAY, "interfaces:", false, Node::NotAMachineReg, relocInfo::none }, // Interfaces
>
> Indentation is wrong.
fixed in new commit.
> src/hotspot/share/opto/type.cpp line 3392:
>
>> 3390: (j >= other->_list.length() ||
>> 3391: compare(_list.at(i), other->_list.at(j)) < 0)) {
>> 3392: result_list.push((ciInstanceKlass*)_list.at(i));
>
> I think you should use `as_instance_klass()` here and in other code.
I moved both `_list` and `result_list` to `ciInstanceKlass` so there's no cast anymore.
> src/hotspot/share/opto/type.hpp line 97:
>
>> 95: Array, // Array types
>> 96:
>> 97: Interfaces,
>
> Please add a comment
Done in new commit.
> src/hotspot/share/opto/type.hpp line 877:
>
>> 875: };
>> 876:
>> 877: class TypeInterfaces : public Type {
>
> Please add a comment
Done in new commit.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16309#issuecomment-1779542554
PR Review Comment: https://git.openjdk.org/jdk/pull/16309#discussion_r1371960143
PR Review Comment: https://git.openjdk.org/jdk/pull/16309#discussion_r1371961251
PR Review Comment: https://git.openjdk.org/jdk/pull/16309#discussion_r1371961457
PR Review Comment: https://git.openjdk.org/jdk/pull/16309#discussion_r1371961673
More information about the hotspot-compiler-dev
mailing list