diff mbox

[lto] Also stream TYPE_ADDR_SPACE. (issue5308067)

Message ID 20111030222516.EBB901DA196@topo.tor.corp.google.com
State New
Headers show

Commit Message

Diego Novillo Oct. 30, 2011, 10:25 p.m. UTC
I found this on the PPH branch.  We were not handling TYPE_ADDR_SPACE
in the streamer.

Fixed with this patch.  Richi, I will apply it on trunk unless you
remember some reason why we never streamed this?  It does not seem to
affect any LTO tests.

Tested with lto profiledbootstrap on x86_64.


Diego.


	* tree-streamer-out.c (pack_ts_base_value_fields): Emit
	TYPE_ADDR_SPACE.
	* tree-streamer-in.c (unpack_ts_base_value_fields): Read
	TYPE_ADDR_SPACE.
diff mbox

Patch

diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c
index db2bb37..86eb9ce 100644
--- a/gcc/tree-streamer-in.c
+++ b/gcc/tree-streamer-in.c
@@ -130,7 +130,10 @@  unpack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
   TREE_PROTECTED (expr) = (unsigned) bp_unpack_value (bp, 1);
   TREE_DEPRECATED (expr) = (unsigned) bp_unpack_value (bp, 1);
   if (TYPE_P (expr))
-    TYPE_SATURATING (expr) = (unsigned) bp_unpack_value (bp, 1);
+    {
+      TYPE_SATURATING (expr) = (unsigned) bp_unpack_value (bp, 1);
+      TYPE_ADDR_SPACE (expr) = (unsigned) bp_unpack_value (bp, 8);
+    }
   else if (TREE_CODE (expr) == SSA_NAME)
     SSA_NAME_IS_DEFAULT_DEF (expr) = (unsigned) bp_unpack_value (bp, 1);
   else
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index 58be0a3..c46859f 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -100,7 +100,10 @@  pack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
   bp_pack_value (bp, TREE_PROTECTED (expr), 1);
   bp_pack_value (bp, TREE_DEPRECATED (expr), 1);
   if (TYPE_P (expr))
-    bp_pack_value (bp, TYPE_SATURATING (expr), 1);
+    {
+      bp_pack_value (bp, TYPE_SATURATING (expr), 1);
+      bp_pack_value (bp, TYPE_ADDR_SPACE (expr), 8);
+    }
   else if (TREE_CODE (expr) == SSA_NAME)
     bp_pack_value (bp, SSA_NAME_IS_DEFAULT_DEF (expr), 1);
   else