RFR: 8298952: All nodes should have type(n) == Value(n) after IGVN [v5]

Emanuel Peter epeter at openjdk.org
Thu Feb 2 07:44:32 UTC 2023


On Wed, 1 Feb 2023 08:06:08 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   two small fixes and copyright 2023
>
> src/hotspot/share/opto/phaseX.cpp line 1706:
> 
>> 1704:           if (in1 == n) {
>> 1705:             // in1 modified -> could turn into X -> do traversal based on right pattern.
>> 1706:             for (uint i2 = 0; i2 < cmp->outcnt(); i2++) {
> 
> You should also use `DUIterator_Fast` similar to the other checks below. I think you can then also remove the `nullptr` checks for the out nodes.

👍

> src/hotspot/share/opto/phaseX.cpp line 1714:
> 
>> 1712:                     for (uint i4 = 0; i4 < iff->outcnt(); i4++) {
>> 1713:                       Node* if_proj = iff->raw_out(i4); // For each IfProj
>> 1714:                       if (if_proj != nullptr && (if_proj->is_IfFalse() || if_proj->is_IfTrue())) {
> 
> An `If` should only have `IfTrue` or `IfFalse` as out node. You could turn this into an assert with `is_IfProj()`.

👍

> src/hotspot/share/opto/subnode.cpp line 1194:
> 
>> 1192: 
>> 1193:   // Bypass the dependent load, and compare directly
>> 1194:   this->set_req_X(1,ldk2, phase);
> 
> Suggestion:
> 
>   this->set_req_X(1, ldk2, phase);

👍

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

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


More information about the hotspot-compiler-dev mailing list