From patchwork Tue Jun 28 22:37:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gab Charette X-Patchwork-Id: 102497 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 2ECD5B6EE9 for ; Wed, 29 Jun 2011 08:37:36 +1000 (EST) Received: (qmail 9366 invoked by alias); 28 Jun 2011 22:37:33 -0000 Received: (qmail 9216 invoked by uid 22791); 28 Jun 2011 22:37:32 -0000 X-SWARE-Spam-Status: No, hits=-1.4 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) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Jun 2011 22:37:14 +0000 Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id p5SMbDRM018671; Tue, 28 Jun 2011 15:37:13 -0700 Received: from gchare.mtv.corp.google.com (gchare.mtv.corp.google.com [172.18.111.122]) by wpaz24.hot.corp.google.com with ESMTP id p5SMbBBZ018325; Tue, 28 Jun 2011 15:37:11 -0700 Received: by gchare.mtv.corp.google.com (Postfix, from userid 138564) id 42ECA1C124A; Tue, 28 Jun 2011 15:37:10 -0700 (PDT) To: reply@codereview.appspotmail.com, crowl@google.com, dnovillo@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Append DECL_CONTEXT of global namespace to cache in preload (issue4629081) Message-Id: <20110628223711.42ECA1C124A@gchare.mtv.corp.google.com> Date: Tue, 28 Jun 2011 15:37:10 -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 need members of the global namespace to point to the global translation unit decl. Thus we will append DECL_CONTEXT of global namespace to cache in preload. This doesn't fix any tests, but helps towards making the tree nodes identicals in pph-mode. Tested with bootstrap build and pph regression testing. 2011-06-28 Gabriel Charette * pph-streamer.c (pph_preload_common_nodes): Append DECL_CONTEXT of global_namespace to cache. --- This patch is available for review at http://codereview.appspot.com/4629081 diff --git a/gcc/cp/pph-streamer.c b/gcc/cp/pph-streamer.c index c62864a..b7ad486 100644 --- a/gcc/cp/pph-streamer.c +++ b/gcc/cp/pph-streamer.c @@ -91,6 +91,8 @@ pph_preload_common_nodes (struct lto_streamer_cache_d *cache) } lto_streamer_cache_append (cache, global_namespace); + + lto_streamer_cache_append (cache, DECL_CONTEXT (global_namespace)); }