RFR: 8353551: C2: Constant folding for ReverseBytes nodes [v2]
Vladimir Ivanov
vlivanov at openjdk.org
Wed Apr 9 17:58:43 UTC 2025
On Wed, 9 Apr 2025 09:34:28 GMT, Hannes Greule <hgreule at openjdk.org> wrote:
> And I assume that should be a TypeNode then?
Why do you think it benefits from becoming a `TypeNode`?
> In that case, as ReverseBytes*Nodes are InvolutionNodes, would InvolutionNode need to be a TypeNode? Or can I use multiple inheritance?
We try to avoid multiple inheritance in JVM and C2 doesn't use any AFAIK.
Actually, I had an afterthought about `InvolutionNode` after approving it. It looks a bit weird to model "involution" property through inheritance. (Primarily, because it's hard to mix multiple properties.) Node flags would be a better fit IMO.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24382#discussion_r2035858736
More information about the hotspot-compiler-dev
mailing list