]> git.ipfire.org Git - thirdparty/gcc.git/commit
Shrink back size of tree_exp from 40 bytes to 32
authorJakub Jelinek <jakub@redhat.com>
Sun, 15 Dec 2024 12:13:07 +0000 (13:13 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 15 Dec 2024 12:13:07 +0000 (13:13 +0100)
commitf359fbb364e676176884f316585dcb1fa82b5e27
treee077f3a821fdf1fceb33b280c0fb93f93e7a27dc
parenta87bf1d20a37bb69c9fa6d2211ffd963aa69240d
Shrink back size of tree_exp from 40 bytes to 32

The following patch implements what I've mentioned in the 64-bit
location_t thread.
struct tree_exp had unsigned condition_uid member added for something
rarely used (-fcondition-coverage) and even there used only on very small
subset of trees only for the duration of the gimplification.

The following patch uses a hash_map instead, which allows shrinking
tree_exp to its previous size (32 bytes + (number of operands - 1) * sizeof
(tree)).

2024-12-15  Jakub Jelinek  <jakub@redhat.com>

* tree-core.h (struct tree_exp): Remove condition_uid member.
* tree.h (SET_EXPR_UID, EXPR_COND_UID): Remove.
* gimplify.cc (nextuid): Rename to ...
(nextconduid): ... this.
(cond_uids): New static variable.
(next_cond_uid, reset_cond_uid): Adjust for the renaming,
formatting fix.
(tree_associate_condition_with_expr): New function.
(shortcut_cond_r, tag_shortcut_cond, shortcut_cond_expr): Use it
instead of SET_EXPR_UID.
(gimplify_cond_expr): Look up cond_uid in cond_uids hash map if
non-NULL instead of using EXPR_COND_UID.
(gimplify_function_tree): Delete cond_uids and set it to NULL.
gcc/gimplify.cc
gcc/tree-core.h
gcc/tree.h