RFR: 8267904: C2 crash when compile negative Arrays.copyOf length after loop [v4]

Hui Shi hshi at openjdk.java.net
Wed Jun 2 23:13:03 UTC 2021


On Wed, 2 Jun 2021 14:40:41 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> @rwestrel 
>> for "record_for_igvn" is likely not needed either.  Please help correct my understanding.
>> 
>> In GraphKit::new_array, CastIINode's _range_check_dependency is false and _gvn is not igvn. 
>> When "_gvn.transform(ccast)" calls CastIINode::Ideal, it either already in for_igvn (goes to "phase->record_for_igvn(this)") or in "post_loop_opts_igvn". 
>> 
>> No need call record_for_igvn again after " _gvn.transform(ccast)".
>
> The usual pattern at parse time is to call gvn.transform() and that's it. Later on, during igvn, if an input of a node changes, it's enqueued to be processed for igvn so at parse time, usually, there's no need to call record_for_igvn().
> In this case, I think there's a call to record_for_igvn() because there's no call to gvn.transform(). The node has to be transformed at some point. If it's not done during gvn, it has to be during igvn and the cal to record_for_igvn() guarantees that.

Thanks! New commit is added to remove not needed ops.

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

PR: https://git.openjdk.java.net/jdk/pull/4238


More information about the hotspot-compiler-dev mailing list