RFR: 8347405: MergeStores with reverse bytes order value [v5]
Emanuel Peter
epeter at openjdk.org
Mon Jan 20 07:36:42 UTC 2025
On Mon, 20 Jan 2025 07:23:03 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/memnode.cpp line 2956:
>>
>>> 2954: }
>>> 2955:
>>> 2956: bool MergePrimitiveStores::is_adjacent_input_pair(const Node* n1, const Node* n2, const int memory_size) {
>>
>> Nit: This may be a little "nitpicky". But I don't like `is_...` methods that have side-effects. That is why I'd be sad to see the `const` go.
>
> Ok, I would really like to have the `const` at the end of an `is_...` method.
> I see that you want to take care of the value order.
>
> Suggestion: instead of returning a `bool`, you could return an `enum`: `NotAdjacent`, `Forward` and `Backward`.
You may have to do similar refactorings further up as well.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23030#discussion_r1921917126
More information about the hotspot-compiler-dev
mailing list