Integrated: 8282208: Reduce MachNode size

Nils Eliasson neliasso at openjdk.java.net
Wed Feb 23 12:50:53 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

This pull request has now been integrated.

Changeset: 5035bf5e
Author:    Nils Eliasson <neliasso at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/5035bf5e6cb0ae2892e128b9a7c4014d01addb26
Stats:     18 lines in 2 files changed: 5 ins; 6 del; 7 mod

8282208: Reduce MachNode size

Reviewed-by: kvn, thartmann, jiefu

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

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


More information about the hotspot-compiler-dev mailing list