RFR: 8282208: Reduce MachNode size [v2]
Tobias Hartmann
thartmann at openjdk.java.net
Wed Feb 23 09:04:44 UTC 2022
On Wed, 23 Feb 2022 08:55:27 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
>
> Nils Eliasson has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update copyright year
> - Fix typo
Looks good to me.
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7562
More information about the hotspot-compiler-dev
mailing list