diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-19 10:31:23 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-19 10:31:23 +0000 |
commit | bddb37639dd332492a524ea28da9aa34cf1a2903 (patch) | |
tree | 33bf9f864a99e5d23f72adbcd38ea97726d8ff2b /gcc/lto | |
parent | 01bbe5aaf5cf92b9f4e235dbe0fe91b5f903f679 (diff) | |
download | gcc-bddb37639dd332492a524ea28da9aa34cf1a2903.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173900 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 7f10bfbf7ae..79e0146694d 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 ce72711f99f..67e080f8389 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;) |