diff mbox

[pph] Add FIXME comment to avoid finalizing decls when generating pph image. (issue4626099)

Message ID 20110706205525.7E1CC1C3723@gchare.mtv.corp.google.com
State New
Headers show

Commit Message

Gab Charette July 6, 2011, 8:55 p.m. UTC
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


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

Comments

Diego Novillo July 6, 2011, 11:31 p.m. UTC | #1
On Wed, Jul 6, 2011 at 16:55, Gabriel Charette <gchare@google.com> wrote:

> +2011-07-06  Gabriel Charette  <gchare@google.com>
> +
> +       * passes.c (rest_of_decl_compilation): Add FIXME pph comment.
> +

OK under the obvious rule (small patches like this one that make
obvious fixes to documentation or formatting or code do not need
explicit approval).


Diego.
diff mbox

Patch

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  <gchare@google.com>
+
+	* passes.c (rest_of_decl_compilation): Add FIXME pph comment.
+
 2011-07-05  Diego Novillo  <dnovillo@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)