Patchwork [pph] Rebuild compilation context from PPH images (2/6) (issue4413048)

login
register
mail settings
Submitter Diego Novillo
Date April 14, 2011, 7:40 p.m.
Message ID <20110414194056.6FF63A00D@topo.tor.corp.google.com>
Download mbox | patch
Permalink /patch/91283/
State New
Headers show

Comments

Diego Novillo - April 14, 2011, 7:40 p.m.
When pickling type bitfields, we were not processing TYPE_ADDR_SPACE.


    	* lto-streamer-in.c (unpack_ts_base_value_fields): Handle
    	TYPE_ADDR_SPACE.
    	* lto-streamer-out.c (pack_ts_base_value_fields): Likewise.



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

Patch

diff --git a/gcc/ChangeLog.pph b/gcc/ChangeLog.pph
index 6cd6bf0..60d162e 100644
--- a/gcc/ChangeLog.pph
+++ b/gcc/ChangeLog.pph
@@ -1,3 +1,9 @@ 
+2011-04-14  Diego Novillo  <dnovillo@google.com>
+
+	* lto-streamer-in.c (unpack_ts_base_value_fields): Handle
+	TYPE_ADDR_SPACE.
+	* lto-streamer-out.c (pack_ts_base_value_fields): Likewise.
+
 2011-04-04  Diego Novillo  <dnovillo@google.com>
 
 	* lto-streamer-in.c (lto_input_tree_pointers): Remove checks
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 00a7a01..97b86ce 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1534,7 +1534,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/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 974f3a9..3ccad8b 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -335,7 +335,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