From e6be8cf7b9315fe0807fd436116801c3bab86a09 Mon Sep 17 00:00:00 2001 From: dnovillo Date: Tue, 26 Apr 2011 23:51:51 +0000 Subject: [PATCH] * pph-streamer.h (pph_output_tree_or_ref_1): New. (pph_output_tree_lst): Remove. Change all callers to call pph_output_tree_1 with a tracing level of 2. (pph_output_tree_aux): Remove. Change all callers to call pph_output_tree_1 with a tracing level of 3. (pph_output_tree_or_ref): Call pph_output_tree_or_ref_1 with a tracing level of 2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/pph@172997 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog.pph | 10 ++++++++++ gcc/cp/pph-streamer-out.c | 12 ++++++------ gcc/cp/pph-streamer.h | 28 +++++++++------------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/gcc/cp/ChangeLog.pph b/gcc/cp/ChangeLog.pph index a57147f20fb..af05a96c190 100644 --- a/gcc/cp/ChangeLog.pph +++ b/gcc/cp/ChangeLog.pph @@ -1,5 +1,15 @@ 2011-04-26 Diego Novillo + * pph-streamer.h (pph_output_tree_or_ref_1): New. + (pph_output_tree_lst): Remove. Change all + callers to call pph_output_tree_1 with a tracing level of 2. + (pph_output_tree_aux): Remove. Change all callers to call + pph_output_tree_1 with a tracing level of 3. + (pph_output_tree_or_ref): Call pph_output_tree_or_ref_1 with + a tracing level of 2. + +2011-04-26 Diego Novillo + * pph-streamer-in.c (pph_stream_unpack_value_fields): Read TREE_LANG_FLAG_? fields. * pph-streamer-out.c (pph_stream_pack_value_fields): Write diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c index 3af4d41164a..a5670c35b93 100644 --- a/gcc/cp/pph-streamer-out.c +++ b/gcc/cp/pph-streamer-out.c @@ -252,9 +252,9 @@ pph_stream_write_ld_min (pph_stream *stream, struct lang_decl_min *ldm, gcc_assert (ldm->base.selector == 0); - pph_output_tree_or_ref (stream, ldm->template_info, ref_p); + pph_output_tree_or_ref_1 (stream, ldm->template_info, ref_p, 1); if (ldm->base.u2sel == 0) - pph_output_tree_or_ref (stream, ldm->u2.access, ref_p); + pph_output_tree_or_ref_1 (stream, ldm->u2.access, ref_p, 1); else if (ldm->base.u2sel == 1) pph_output_uint (stream, ldm->u2.discriminator); else @@ -795,11 +795,11 @@ pph_stream_write_tree (struct output_block *ob, tree expr, bool ref_p) pph_stream_write_lang_specific (stream, expr, ref_p); if (TREE_CODE (expr) == FUNCTION_DECL) - pph_output_tree_aux (stream, DECL_SAVED_TREE (expr), ref_p); + pph_output_tree_or_ref_1 (stream, DECL_SAVED_TREE (expr), ref_p, 3); } if (TREE_CODE (expr) == TYPE_DECL) - pph_output_tree_aux (stream, DECL_ORIGINAL_TYPE (expr), ref_p); + pph_output_tree_or_ref_1 (stream, DECL_ORIGINAL_TYPE (expr), ref_p, 3); } else if (TREE_CODE (expr) == STATEMENT_LIST) { @@ -814,7 +814,7 @@ pph_stream_write_tree (struct output_block *ob, tree expr, bool ref_p) /* Write the statements. */ for (i = tsi_start (expr); !tsi_end_p (i); tsi_next (&i)) - pph_output_tree_aux (stream, tsi_stmt (i), ref_p); + pph_output_tree_or_ref_1 (stream, tsi_stmt (i), ref_p, 3); } else if (TYPE_P (expr)) pph_stream_write_lang_type (stream, expr, ref_p); @@ -863,7 +863,7 @@ pph_output_chain_filtered (pph_stream *stream, tree first, bool ref_p, saved_chain = TREE_CHAIN (t); TREE_CHAIN (t) = NULL_TREE; - pph_output_tree_lst (stream, t, ref_p); + pph_output_tree_or_ref_1 (stream, t, ref_p, 2); TREE_CHAIN (t) = saved_chain; } diff --git a/gcc/cp/pph-streamer.h b/gcc/cp/pph-streamer.h index e0040b2af94..5c5c2b99011 100644 --- a/gcc/cp/pph-streamer.h +++ b/gcc/cp/pph-streamer.h @@ -138,33 +138,23 @@ pph_output_tree (pph_stream *stream, tree t, bool ref_p) lto_output_tree (stream->ob, t, ref_p); } -/* Output AST T to STREAM. If REF_P is true, output all the leaves of T - as references. This function is an list auxillary routine. */ -static inline void -pph_output_tree_lst (pph_stream *stream, tree t, bool ref_p) -{ - if (flag_pph_tracer >= 2) - pph_stream_trace_tree (stream, t, ref_p); - lto_output_tree (stream->ob, t, ref_p); -} - -/* Output AST T to STREAM. If REF_P is true, output all the leaves of T - as references. This function is an internal auxillary routine. */ +/* Output AST T to STREAM. If REF_P is true, output a reference to T. + If -fpph-tracer is set to TLEVEL or higher, T is sent to + pph_stream_trace_tree. */ static inline void -pph_output_tree_aux (pph_stream *stream, tree t, bool ref_p) +pph_output_tree_or_ref_1 (pph_stream *stream, tree t, bool ref_p, int tlevel) { - if (flag_pph_tracer >= 3) + if (flag_pph_tracer >= tlevel) pph_stream_trace_tree (stream, t, ref_p); - lto_output_tree (stream->ob, t, ref_p); + lto_output_tree_or_ref (stream->ob, t, ref_p); } -/* Output AST T to STREAM. If REF_P is true, output a reference to T. */ +/* Output AST T to STREAM. If REF_P is true, output a reference to T. + Trigger tracing at -fpph-tracer=2. */ static inline void pph_output_tree_or_ref (pph_stream *stream, tree t, bool ref_p) { - if (flag_pph_tracer >= 2) - pph_stream_trace_tree (stream, t, ref_p); - lto_output_tree_or_ref (stream->ob, t, ref_p); + pph_output_tree_or_ref_1 (stream, t, ref_p, 2); } /* Write an unsigned int VALUE to STREAM. */ -- 2.11.4.GIT