This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lto] Also stream TYPE_ADDR_SPACE. (issue5308067)


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 --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
-- 
1.7.3.1


--
This patch is available for review at http://codereview.appspot.com/5308067


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]