RFR: 8299179: ArrayFill with store on backedge needs to reduce length by 1 [v2]

Emanuel Peter epeter at openjdk.org
Wed Jan 11 10:25:16 UTC 2023


On Tue, 10 Jan 2023 23:11:19 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix indentation
>>   
>>   Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
>
> src/hotspot/share/opto/loopTransform.cpp line 4389:
> 
>> 4387:   if (store->in(0) == backedge) {
>> 4388:     len = new SubINode(len, _igvn.intcon(1));
>> 4389:     _igvn.register_new_node_with_optimizer(len);
> 
> How about moving the earlier call to register_new_node_with_optimizer to after this block, so it is only called once?

Hi @dean-long . Just discussed it with @TobiHartmann . We have two new nodes here, one to compute
`len = limit - init`,
the other to decrement the len by 1:
`len = len - 1`.
Both are new nodes, and need to be registered with igvn. So we think it is correct the way it is now.

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

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


More information about the hotspot-compiler-dev mailing list