* Remove dead handling of label_decl in tree merging
@ 2023-04-21 11:35 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2023-04-21 11:35 UTC (permalink / raw)
To: gcc-patches
Hi,
while working on incremental WHOPR with Michal Jires, we noticed that
there is code hashing LABEL_DECL_UID in lto-streamer-out which would
break the hash table, since label decls are not streamed and gets
re-initialized later.
The whole conditional is dead since LABEL_DECLs are not merged across
TUs.
ltobootstrapped/regtested x86_64-linux, plan to commit it shortly.
gcc/ChangeLog:
* lto-streamer-out.cc (hash_tree): Remove dead handling of LABEL_DECL.
gcc/lto/ChangeLog:
* lto-common.cc (compare_tree_sccs_1): Remove dead handling of LABEL_DECL.
diff --git a/gcc/lto-streamer-out.cc b/gcc/lto-streamer-out.cc
index 0bca530313c..27f9edd3fcd 100644
--- a/gcc/lto-streamer-out.cc
+++ b/gcc/lto-streamer-out.cc
@@ -1268,12 +1268,8 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map,
hstate.add_flag (DECL_NOT_GIMPLE_REG_P (t));
hstate.commit_flag ();
hstate.add_int (DECL_ALIGN (t));
- if (code == LABEL_DECL)
- {
- hstate.add_int (EH_LANDING_PAD_NR (t));
- hstate.add_int (LABEL_DECL_UID (t));
- }
- else if (code == FIELD_DECL)
+ gcc_checking_assert (code != LABEL_DECL);
+ if (code == FIELD_DECL)
{
hstate.add_flag (DECL_PACKED (t));
hstate.add_flag (DECL_NONADDRESSABLE_P (t));
diff --git a/gcc/lto/lto-common.cc b/gcc/lto/lto-common.cc
index 882dd8971a4..597fc5dbabf 100644
--- a/gcc/lto/lto-common.cc
+++ b/gcc/lto/lto-common.cc
@@ -1180,12 +1180,8 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map)
compare_values (DECL_EXTERNAL);
compare_values (DECL_NOT_GIMPLE_REG_P);
compare_values (DECL_ALIGN);
- if (code == LABEL_DECL)
- {
- compare_values (EH_LANDING_PAD_NR);
- compare_values (LABEL_DECL_UID);
- }
- else if (code == FIELD_DECL)
+ gcc_checking_assert (code != LABEL_DECL);
+ if (code == FIELD_DECL)
{
compare_values (DECL_PACKED);
compare_values (DECL_NONADDRESSABLE_P);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-21 11:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-21 11:35 Remove dead handling of label_decl in tree merging Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).