RFR: 6312651: Compiler should only use verified interface types for optimization [v2]

Roland Westrelin roland at openjdk.org
Wed Nov 9 14:47:42 UTC 2022


On Sat, 29 Oct 2022 00:13:55 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> Thanks, Roland! Overall, looks very good.

Thanks for reviewing this. I pushed new commits that should address your comments/suggestions.

> src/hotspot/share/opto/type.cpp line 572:
> 
>> 570: 
>> 571:   TypeAryPtr::_array_interfaces = new TypePtr::InterfaceSet();
>> 572:   GrowableArray<ciInstanceKlass*>* array_interfaces = ciArrayKlass::interfaces();
> 
> Maybe move the code into a constructor or a factory method?
> After that, the only user of `TypePtr::InterfaceSet::add()` will be `TypePtr::interfaces()`.
> It would be nice to make `TypePtr::InterfaceSet` immutable and cache query results (`InterfaceSet::is_loaded() ` and `InterfaceSet::exact_klass()`).

Good suggestion as well.

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

PR: https://git.openjdk.org/jdk/pull/10901


More information about the hotspot-compiler-dev mailing list