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

Dean Long dlong at openjdk.org
Wed Jan 11 22:16:17 UTC 2023


On Wed, 11 Jan 2023 10:22:02 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> 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.

OK, that makes sense.

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

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


More information about the hotspot-compiler-dev mailing list