From patchwork Wed Jul 6 20:55:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gab Charette X-Patchwork-Id: 103576 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 66528B6F6F for ; Thu, 7 Jul 2011 06:55:49 +1000 (EST) Received: (qmail 12963 invoked by alias); 6 Jul 2011 20:55:46 -0000 Received: (qmail 12953 invoked by uid 22791); 6 Jul 2011 20:55:45 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jul 2011 20:55:30 +0000 Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [172.25.149.11]) by smtp-out.google.com with ESMTP id p66KtSBa022901; Wed, 6 Jul 2011 13:55:29 -0700 Received: from gchare.mtv.corp.google.com (gchare.mtv.corp.google.com [172.18.111.122]) by hpaq11.eem.corp.google.com with ESMTP id p66KtPUp025450; Wed, 6 Jul 2011 13:55:26 -0700 Received: by gchare.mtv.corp.google.com (Postfix, from userid 138564) id 7E1CC1C3723; Wed, 6 Jul 2011 13:55:25 -0700 (PDT) To: reply@codereview.appspotmail.com, crowl@google.com, dnovillo@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Add FIXME comment to avoid finalizing decls when generating pph image. (issue4626099) Message-Id: <20110706205525.7E1CC1C3723@gchare.mtv.corp.google.com> Date: Wed, 6 Jul 2011 13:55:25 -0700 (PDT) From: gchare@google.com (Gabriel Charette) X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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 + + * passes.c (rest_of_decl_compilation): Add FIXME pph comment. + 2011-07-05 Diego Novillo 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)