RFR: 8282208: Reduce MachNode size

Jie Fu jiefu at openjdk.java.net
Wed Feb 23 01:25:50 UTC 2022


On Mon, 21 Feb 2022 16:19:01 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:

> Hi,
> 
> This patch reduces the size of MachNode from 72  to 64 bytes in product builds, and from 120 to 104 bytes in debug builds. In debug builds the size of Node is reduced from 104 to 96 bytes.
> 
> The motivation for this patch is that I needed more bits for the _barrier_data field. (This will happen in another patch.) I noticed that the bool _remove field caused a lot of padding. It's only used by peephole and can as well be modeled as a Node::flag. This change together with a slight rearrangement of fields a lot of unnecessary padding can be eliminated. 
> 
> Fixes in this patch:
> 
> 1) Change MachNode::_remove to a Node::flag
> 
> 2) Changing MachNode::operands to a 16 bit unsigned (Allowing room for 16 bits _barrier_data later) 
> 
> 3) Moving Node::_debug_idx below Node::_debug_orig saves 8 bytes in debug builds. This is achieved by having an even number of 4 bytes fields in a row, eliminating two 4 byte paddings.
> 
> Please review,
> Nils Eliasson

There are several failures in the github tests.
Did you test the failing cases with your patch?

Also, we'd better update the copyright year.
Thanks.

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

PR: https://git.openjdk.java.net/jdk/pull/7562


More information about the hotspot-compiler-dev mailing list