RFR: 8353551: C2: Constant folding for ReverseBytes nodes [v3]

Vladimir Ivanov vlivanov at openjdk.org
Thu Apr 10 19:39:32 UTC 2025


On Thu, 10 Apr 2025 09:04:39 GMT, Hannes Greule <hgreule at openjdk.org> wrote:

>> This change implements constant folding for ReverseBytes nodes.
>> 
>> Currently, `byteswap` is included transitively by `reverse_bits.hpp`. I'm not sure if this is fine or if I need to add an explicit include there.
>> 
>> I appreciate any reviews and comments.
>
> Hannes Greule has updated the pull request incrementally with one additional commit since the last revision:
> 
>   introduce common ReverseBytesNode

Overall, looks good. Submitted it for testing.

src/hotspot/share/opto/subnode.cpp line 2024:

> 2022: }
> 2023: 
> 2024: const Type* reverse_bytes(int opcode, const Type* con) {

Please, declare it as static.

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

PR Review: https://git.openjdk.org/jdk/pull/24382#pullrequestreview-2758148334
PR Review Comment: https://git.openjdk.org/jdk/pull/24382#discussion_r2038178535


More information about the hotspot-compiler-dev mailing list