RFR: 8341411: C2: remove slice parameter from GraphKit::make_load() and GraphKit::store_to_memory() [v3]
theoweidmannoracle
duke at openjdk.org
Thu Nov 7 16:06:17 UTC 2024
On Wed, 6 Nov 2024 12:01:41 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> theoweidmannoracle has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add asserts
>
> src/hotspot/share/opto/graphKit.cpp line 1561:
>
>> 1559: bool unsafe,
>> 1560: uint8_t barrier_data) {
>> 1561: assert(adr_idx == C->get_alias_index(_gvn.type(adr)->isa_ptr()), "slice of address and input slice don't match");
>
> This assert (and the other one in `store_to_memory`) were added because there are 2 ways to compute the slice for a memory operation. One is from `_gvn.type(adr)->isa_ptr()`. The other is from `C->alias_type(field)->adr_type()` in case of fields accesses (see `Parse::do_get_xxx()` and `Parse::do_put_xxx()`). They should give the same result but in one bug we ran into that wasn't the case (thus the assert). I don't think we want to remove this assert entirely but rather push it up the call chain maybe to `BarrierSetC2::store_at_resolved()`/`BarrierSetC2::load_at_resolved` or all the way to where `C->alias_type(field)->adr_type()` is called.
I've added the asserts as we discussed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21834#discussion_r1832940662
More information about the hotspot-dev
mailing list