Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(746)

Issue 4869045: [pph] Remove most ties with LTO streamer (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by Diego Novillo
Modified:
12 years, 11 months ago
Reviewers:
CC:
Lawrence Crowl, Gabriel Charette, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -14 lines) Patch
M gcc/cp/pph-streamer-in.c View 1 chunk +0 lines, -2 lines 0 comments Download
M gcc/cp/pph-streamer-out.c View 2 chunks +1 line, -12 lines 0 comments Download

Messages

Total messages: 1
Diego Novillo
12 years, 11 months ago (2011-08-12 17:27:20 UTC) #1
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.

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);
 }
 

--
This patch is available for review at http://codereview.appspot.com/4869045
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b