From patchwork Fri Aug 12 17:27:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 109879 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 31D26B6F76 for ; Sat, 13 Aug 2011 03:27:41 +1000 (EST) Received: (qmail 28578 invoked by alias); 12 Aug 2011 17:27:37 -0000 Received: (qmail 28568 invoked by uid 22791); 12 Aug 2011 17:27:35 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_20, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RP_MATCHES_RCVD, SPF_HELO_PASS 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; Fri, 12 Aug 2011 17:27:21 +0000 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id p7CHRJcj019953; Fri, 12 Aug 2011 10:27:19 -0700 Received: from topo.tor.corp.google.com (topo.tor.corp.google.com [172.29.41.2]) by wpaz33.hot.corp.google.com with ESMTP id p7CHRHuV029913; Fri, 12 Aug 2011 10:27:17 -0700 Received: by topo.tor.corp.google.com (Postfix, from userid 54752) id 52CD61DA1CF; Fri, 12 Aug 2011 13:27:17 -0400 (EDT) To: reply@codereview.appspotmail.com, crowl@google.com, gchare@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Remove most ties with LTO streamer (issue4869045) Message-Id: <20110812172717.52CD61DA1CF@topo.tor.corp.google.com> Date: Fri, 12 Aug 2011 13:27:17 -0400 (EDT) From: dnovillo@google.com (Diego Novillo) 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 Now that we do not depend on the LTO streamer anymore, these calls are unnecessary. There are still some remnants that will be necessary until I factor the pickling buffers out of lto-streamer.h. Tested on x86_64. Committed to branch. Diego. * pph-streamer-in.c (pph_init_read): Do not call lto_reader_init. * pph-streamer-out.c (pph_init_write): Do not call lto_streamer_init. (pph_out_body): Do not call lto_output_decl_state_streams nor lto_output_decl_state_refs. --- This patch is available for review at http://codereview.appspot.com/4869045 diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c index 1e31427..e644113 100644 --- a/gcc/cp/pph-streamer-in.c +++ b/gcc/cp/pph-streamer-in.c @@ -87,8 +87,6 @@ pph_init_read (pph_stream *stream) const char *strtab, *body; char *new_strtab; - lto_reader_init (); - /* Read STREAM->NAME into the memory buffer stream->encoder.r.file_data. */ retcode = fstat (fileno (stream->file), &st); gcc_assert (retcode == 0); diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c index ec95532..2e5543a 100644 --- a/gcc/cp/pph-streamer-out.c +++ b/gcc/cp/pph-streamer-out.c @@ -45,7 +45,6 @@ static pph_stream *pph_out_stream = NULL; void pph_init_write (pph_stream *stream) { - lto_streamer_init (); stream->encoder.w.out_state = lto_new_out_decl_state (); lto_push_out_decl_state (stream->encoder.w.out_state); stream->encoder.w.decl_state_stream = XCNEW (struct lto_output_stream); @@ -149,17 +148,7 @@ pph_out_body (pph_stream *stream) /* Write the string table. */ lto_write_stream (stream->encoder.w.ob->string_stream); - /* Write out the physical representation for every AST in all the - streams in STREAM->ENCODER.W.OUT_STATE. */ - lto_output_decl_state_streams (stream->encoder.w.ob, - stream->encoder.w.out_state); - - /* Now write the vector of all AST references. */ - lto_output_decl_state_refs (stream->encoder.w.ob, - stream->encoder.w.decl_state_stream, - stream->encoder.w.out_state); - - /* Finally, physically write all the streams. */ + /* Write the main stream where we have been pickling the parse trees. */ lto_write_stream (stream->encoder.w.ob->main_stream); }