diff options
author | Richard Guenther <rguenther@suse.de> | 2009-08-07 08:21:01 +0000 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2009-08-07 08:21:01 +0000 |
commit | 856cf4881a0d407f7343aa9d6cf1dd65ecba2ffe (patch) | |
tree | 4fc699d80d5b70da627a776130143c1479bfab48 | |
parent | f1102b8ba4caa624d4697ea233a64f34cd9cc8db (diff) |
2009-08-07 Richard Guenther <rguenther@suse.de>
* lto-streamer-out.c (pack_ts_type_value_fields): Stream out
the alias-set if it is zero, else stream out -1.
* lto-streamer-in.c (unpack_ts_type_value_fields): Stream in
the alias-set.
* tree.c (free_lang_data_in_type): Ask the frontend about the
alias-set of the type and record it if it is zero.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@150558 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.lto | 9 | ||||
-rw-r--r-- | gcc/lto-streamer-in.c | 1 | ||||
-rw-r--r-- | gcc/lto-streamer-out.c | 1 | ||||
-rw-r--r-- | gcc/tree.c | 5 |
4 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto index 05317f657a5..d8059a58fa2 100644 --- a/gcc/ChangeLog.lto +++ b/gcc/ChangeLog.lto @@ -1,3 +1,12 @@ +2009-08-07 Richard Guenther <rguenther@suse.de> + + * lto-streamer-out.c (pack_ts_type_value_fields): Stream out + the alias-set if it is zero, else stream out -1. + * lto-streamer-in.c (unpack_ts_type_value_fields): Stream in + the alias-set. + * tree.c (free_lang_data_in_type): Ask the frontend about the + alias-set of the type and record it if it is zero. + 2009-08-03 Richard Guenther <rguenther@suse.de> * lto-streamer-out.c (output_phi): Output phi argument locations. diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 6aedadec6fc..f2ea78e8c65 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1601,6 +1601,7 @@ unpack_ts_type_value_fields (struct bitpack_d *bp, tree expr) TYPE_USER_ALIGN (expr) = (unsigned) bp_unpack_value (bp, 1); TYPE_READONLY (expr) = (unsigned) bp_unpack_value (bp, 1); TYPE_ALIGN (expr) = (unsigned) bp_unpack_value (bp, HOST_BITS_PER_INT); + TYPE_ALIAS_SET (expr) = bp_unpack_value (bp, HOST_BITS_PER_INT); } diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 4ef347d7208..b9b22902c60 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -641,6 +641,7 @@ pack_ts_type_value_fields (struct bitpack_d *bp, tree expr) bp_pack_value (bp, TYPE_USER_ALIGN (expr), 1); bp_pack_value (bp, TYPE_READONLY (expr), 1); bp_pack_value (bp, TYPE_ALIGN (expr), HOST_BITS_PER_INT); + bp_pack_value (bp, TYPE_ALIAS_SET (expr) == 0 ? 0 : -1, HOST_BITS_PER_INT); } diff --git a/gcc/tree.c b/gcc/tree.c index 72a0f5c79f7..fc377ba15f1 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4127,6 +4127,11 @@ free_lang_data_in_type (tree type) { gcc_assert (TYPE_P (type)); + /* Fill in the alias-set. We need to at least track zeroness here + for correctness. */ + if (lang_hooks.get_alias_set (type) == 0) + TYPE_ALIAS_SET (type) = 0; + /* Give the FE a chance to remove its own data first. */ lang_hooks.free_lang_data (type); |