We do not need to finalize decls and add them to the varpool when generating 
the pph image as we will do this when streaming in (lto also already does it 
this way).

I simply added a comment for now, because this will not fix anything, it will 
simply avoid streaming out unecessary stuff. Since this is not in the front-end 
it is not as easy as checking pph_out_file != NULL here.

Gab

diff --git a/gcc/ChangeLog.pph b/gcc/ChangeLog.pph
index b9aeb4d..2776bf0 100644
--- a/gcc/ChangeLog.pph
+++ b/gcc/ChangeLog.pph
@@ -1,3 +1,7 @@
+2011-07-06  Gabriel Charette  <gch...@google.com>
+
+       * passes.c (rest_of_decl_compilation): Add FIXME pph comment.
+
 2011-07-05  Diego Novillo  <dnovi...@google.com>
 
        Merge from trunk rev 175832.
diff --git a/gcc/passes.c b/gcc/passes.c
index fc9767e..ce7f846 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -184,7 +184,9 @@ rest_of_decl_compilation (tree decl,
          && !DECL_EXTERNAL (decl))
        {
          /* When reading LTO unit, we also read varpool, so do not
-            rebuild it.  */
+            rebuild it.
+            FIXME pph: This is also true for pph and we should not
+            call varpool_finalize_decl when generating a pph image.  */
          if (in_lto_p && !at_end)
            ;
          else if (TREE_CODE (decl) != FUNCTION_DECL)

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

Reply via email to