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

Issue 4380046: [pph] Debug Cleanup (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by Lawrence Crowl
Modified:
11 years, 11 months ago
Reviewers:
Diego Novillo
CC:
gcc-patches_gcc.gnu.org
Base URL:
svn+ssh://gcc.gnu.org/svn/gcc/branches/pph/
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -54 lines) Patch
M gcc/c-family/c.opt View 0 chunks +3 lines, -2 lines 0 comments Download
M gcc/cp/name-lookup.c View 0 chunks +-1 lines, -1 line 0 comments Download
M gcc/cp/parser.c View 0 chunks +-1 lines, -1 line 0 comments Download
M gcc/cp/pph.c View 0 chunks +2 lines, -30 lines 0 comments Download
M gcc/cp/pph-streamer.h View 0 chunks +5 lines, -18 lines 0 comments Download
M gcc/cp/pph-streamer-out.c View 0 chunks +-1 lines, -2 lines 0 comments Download

Messages

Total messages: 2
Lawrence Crowl
Move use of flag_pph_debug to the new flag_pph_decls_debug for the declaration dependence analysis. This code ...
13 years, 1 month ago (2011-04-09 02:00:36 UTC) #1
Diego Novillo
13 years ago (2011-04-11 13:01:42 UTC) #2
On Fri, Apr 8, 2011 at 22:00, Lawrence Crowl <crowl@google.com> wrote:

> Split pph_output_tree into pph_output_tree and pph_output_tree_aux.
> The former is the primary external interface, and pph_output_tree_aux
> is the internal (recursive) auxillary, which is used for function
> bodies.

Hm, why?  They both seem identical, except they check different tracing levels.

> 2011-04-08  Lawrence Crowl  <crowl@google.com>
>
>        * pph.c (*): Change use of flag_pph_debug to flag_pph_decls_debug
>        for declaration dependence analysis.
>        (pth_finish): Simplify inconsistency reporting.
>        * name-lookup.c (add_decl_to_level): Change use of flag_pph_debug to
>        flag_pph_decls_debug for declaration dependence analysis.
>        * parser.c (cp_parser_elaborated_type_specifier): Change use of
>        flag_pph_debug to flag_pph_decls_debug for declaration dependence
>        analysis.
>        * pph-streamer.h (pph_output_tree_aux): New.
>        (*): Compare flag_pph_tracer against value.
>        (pph_output_*): Ensure trace happens before write.
>        (pph_output_string_with_length): Add trace for null case.

Regexps in function names in a ChangeLog entry are not allowed.  Sorry :)

> --- 953,960 ----
>  C++ Var(flag_pph_stats)
>  -fpph-stats   Enable statistics gathering for PPH
>
> ! fpph-tracer=
> ! C++ Joined RejectNegative UInteger Var(flag_pph_tracer)
>  -fpph-tracer  Enable tracing of PPH streaming operations

Could you add what the different levels mean to the help text?

> --- 119,139 ----
>  /* Inline functions.  */
>
>  /* Output AST T to STREAM.  If REF_P is true, output all the leaves of T
> !    as references.  This function is the primary interface.  */
>  static inline void
>  pph_output_tree (pph_stream *stream, tree t, bool ref_p)
>  {
> !   if (flag_pph_tracer >= 1)
> !     pph_stream_trace_tree (stream, t);
> !   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.  */
> ! static inline void
> ! pph_output_tree_aux (pph_stream *stream, tree t, bool ref_p)
> ! {
> !   if (flag_pph_tracer >= 3)
>      pph_stream_trace_tree (stream, t);
>    lto_output_tree (stream->ob, t, ref_p);
>  }

Maybe just make the flag_pph_tracer level an argument to
pph_output_tree?  I guess that in the absence of default arg values,
there is no optimum solution here.


Diego.
Sign in to reply to this message.

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