RFR: 8282208: Reduce MachNode size
Nils Eliasson
neliasso at openjdk.java.net
Mon Feb 21 21:49:02 UTC 2022
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
-------------
Commit messages:
- Move debug_idx
- 8282208_reduce_machnode
Changes: https://git.openjdk.java.net/jdk/pull/7562/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7562&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8282208
Stats: 15 lines in 2 files changed: 5 ins; 6 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/7562.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7562/head:pull/7562
PR: https://git.openjdk.java.net/jdk/pull/7562
More information about the hotspot-compiler-dev
mailing list