diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-01 19:13:12 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-01 19:13:12 +0000 |
commit | 27e9c5aefbc725a758c715f8bf13b6a9eab0d93c (patch) | |
tree | c3f43c3a966b65d89c40c0d8c8ccc277127f2c44 | |
parent | dda4a9099fbe2069541d37d7c301bdf46e9fde8f (diff) | |
download | gcc-27e9c5aefbc725a758c715f8bf13b6a9eab0d93c.tar.gz |
* lto-streamer-out.c (hash_tree): Do not stream TYPE_ALIAS_SET.
* tree-streamer-out.c (pack_ts_type_common_value_fields): Do not
stream TYPE_ALIAS_SET.
* tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
stream TYPE_ALIAS_SET.
* lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231124 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/lto-streamer-out.c | 4 | ||||
-rw-r--r-- | gcc/lto/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/lto/lto.c | 4 | ||||
-rw-r--r-- | gcc/tree-streamer-in.c | 1 | ||||
-rw-r--r-- | gcc/tree-streamer-out.c | 10 |
6 files changed, 18 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 94bde391bb3..d5aa3d6e3c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-12-01 Jan Hubicka <hubicka@ucw.cz> + + * lto-streamer-out.c (hash_tree): Do not stream TYPE_ALIAS_SET. + * tree-streamer-out.c (pack_ts_type_common_value_fields): Do not + stream TYPE_ALIAS_SET. + * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not + stream TYPE_ALIAS_SET. + 2015-12-01 Nathan Sidwell <nathan@acm.org> * config/nvptx/nvptx.c (nvptx_function_arg_advance): Don't diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 0d610f166bc..8928873bcc2 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -1109,10 +1109,6 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map, hstate.commit_flag (); hstate.add_int (TYPE_PRECISION (t)); hstate.add_int (TYPE_ALIGN (t)); - hstate.add_int ((TYPE_ALIAS_SET (t) == 0 - || (!in_lto_p - && get_alias_set (t) == 0)) - ? 0 : -1); } if (CODE_CONTAINS_STRUCT (code, TS_TRANSLATION_UNIT_DECL)) diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 1ddacfa158f..a508999e0f6 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2015-12-01 Jan Hubicka <hubicka@ucw.cz> + + * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET. + 2015-11-25 Jan Hubicka <jh@suse.cz> * lto-lang.c (lto_post_options): Process flag_lto_linker_output. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index b1e2d6e8090..dcfa3c868f3 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1166,7 +1166,9 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) compare_values (TYPE_READONLY); compare_values (TYPE_PRECISION); compare_values (TYPE_ALIGN); - compare_values (TYPE_ALIAS_SET); + /* Do not compare TYPE_ALIAS_SET. Doing so introduce ordering issues + with calls to get_alias_set which may initialize it for streamed + in types. */ } /* We don't want to compare locations, so there is nothing do compare diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 7eeab8a2a29..3162d1ae2b5 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -366,7 +366,6 @@ unpack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr) TYPE_RESTRICT (expr) = (unsigned) bp_unpack_value (bp, 1); TYPE_USER_ALIGN (expr) = (unsigned) bp_unpack_value (bp, 1); TYPE_READONLY (expr) = (unsigned) bp_unpack_value (bp, 1); - TYPE_ALIAS_SET (expr) = bp_unpack_value (bp, 1) ? 0 : -1; if (RECORD_OR_UNION_TYPE_P (expr)) { TYPE_TRANSPARENT_AGGR (expr) = (unsigned) bp_unpack_value (bp, 1); diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index ab9b7476635..bfd06449ecb 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -317,13 +317,9 @@ pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr) bp_pack_value (bp, TYPE_RESTRICT (expr), 1); bp_pack_value (bp, TYPE_USER_ALIGN (expr), 1); bp_pack_value (bp, TYPE_READONLY (expr), 1); - /* Make sure to preserve the fact whether the frontend would assign - alias-set zero to this type. Do that only for main variants, because - type variants alias sets are never computed. - FIXME: This does not work for pre-streamed builtin types. */ - bp_pack_value (bp, (TYPE_ALIAS_SET (expr) == 0 - || (!in_lto_p && TYPE_MAIN_VARIANT (expr) == expr - && get_alias_set (expr) == 0)), 1); + /* We used to stream TYPE_ALIAS_SET == 0 information to let frontends mark + types that are opaque for TBAA. This however did not work as intended, + becuase TYPE_ALIAS_SET == 0 was regularly lost in type merging. */ if (RECORD_OR_UNION_TYPE_P (expr)) { bp_pack_value (bp, TYPE_TRANSPARENT_AGGR (expr), 1); |