aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-05-19 10:31:23 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-05-19 10:31:23 +0000
commit31b3ca64f48e85c780d9d98730231ff2961c4d32 (patch)
tree33bf9f864a99e5d23f72adbcd38ea97726d8ff2b /gcc/lto
parentf263981ac8f33dce2cfd904986ee596de5ddcdb1 (diff)
downloadgcc-31b3ca64f48e85c780d9d98730231ff2961c4d32.zip
gcc-31b3ca64f48e85c780d9d98730231ff2961c4d32.tar.gz
gcc-31b3ca64f48e85c780d9d98730231ff2961c4d32.tar.bz2
gimple.c (gimple_types_compatible_p_1): Compare names of the types themselves.
2011-05-19 Richard Guenther <rguenther@suse.de> * gimple.c (gimple_types_compatible_p_1): Compare names of the types themselves. (iterative_hash_gimple_type): And hash them that way. (gimple_register_type_1): If we register a main variant properly initialize the leader to ourselves. lto/ * lto.c (uniquify_nodes): First register all types before fixing up the tree SCC. From-SVN: r173900
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto.c14
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 7f10bfb..79e0146 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-19 Richard Guenther <rguenther@suse.de>
+
+ * lto.c (uniquify_nodes): First register all types before
+ fixing up the tree SCC.
+
2011-05-11 Jan Hubicka <jh@suse.cz>
PR lto/48952
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index ce72711..67e080f 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -605,6 +605,20 @@ uniquify_nodes (struct data_in *data_in, unsigned from)
struct lto_streamer_cache_d *cache = data_in->reader_cache;
unsigned len = VEC_length (tree, cache->nodes);
unsigned i;
+
+ /* Go backwards because childs streamed for the first time come
+ as part of their parents, and hence are created after them. */
+ for (i = len; i-- > from;)
+ {
+ tree t = VEC_index (tree, cache->nodes, i);
+ if (!t)
+ continue;
+
+ /* Now try to find a canonical variant of T itself. */
+ if (TYPE_P (t))
+ gimple_register_type (t);
+ }
+
/* Go backwards because childs streamed for the first time come
as part of their parents, and hence are created after them. */
for (i = len; i-- > from;)