RFR: 8345485: C2 MergeLoads: merge adjacent array/native memory loads into larger load [v15]
kuaiwei
duke at openjdk.org
Wed May 14 03:20:56 UTC 2025
On Fri, 2 May 2025 10:34:02 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> kuaiwei has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix build error on mac and windows
>
> src/hotspot/share/opto/addnode.cpp line 1054:
>
>> 1052: } else {
>> 1053: // not found
>> 1054: add_operators_to_worklist(_combine);
>
> Why are you doing this? If an input still needs to be transformed, then it should be put onto the work list by the inputs of that operator. And not by `combine`, i.e. the use of that operator.
>
> Plus: if those operators are now transformed, would we actually ever get back here and attempt optimizing again? Your flag is now already set with `set_merge_memops_checked`, so we would not get here again, right?
It's in the process of transforming `_combine`, so I think it follows the rule, "put inputs of the operator to worklist", do I misunderstand?
Yes, "_mege_memops_checked" flag is used to block re-transforming `_combine` again.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2087954737
More information about the hotspot-compiler-dev
mailing list