New options to disable/enable any pass for any functions (issue4550056)

Jan Hubicka hubicka@ucw.cz
Wed Jun 1 08:14:00 GMT 2011


> Please discard the previous one. This is the right one:
> 
> David
> Index: tree-pretty-print.c
> ===================================================================
> --- tree-pretty-print.c	(revision 174424)
> +++ tree-pretty-print.c	(working copy)
> @@ -3013,3 +3013,36 @@ pp_base_tree_identifier (pretty_printer 
>      pp_append_text (pp, IDENTIFIER_POINTER (id),
>  		    IDENTIFIER_POINTER (id) + IDENTIFIER_LENGTH (id));
>  }
> +
> +/* A helper function that is used to dump function information before the
> +   function dump.  */
> +
> +void
> +dump_function_header (FILE *dump_file, tree fdecl, struct function *fun)

You can get to FUN via DECL_STRUCT_FUNCTION (fndecl) that would save you a parameter...
> Index: tree-pretty-print.h
> ===================================================================
> --- tree-pretty-print.h	(revision 174422)
> +++ tree-pretty-print.h	(working copy)
> @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3.  
>  #define GCC_TREE_PRETTY_PRINT_H
>  
>  #include "pretty-print.h"
> +#include "coretypes.h"

.. and need for this
> Index: coretypes.h
> ===================================================================
> --- coretypes.h	(revision 174422)
> +++ coretypes.h	(working copy)
> @@ -75,6 +75,7 @@ typedef struct diagnostic_context diagno
>  struct gimple_seq_d;
>  typedef struct gimple_seq_d *gimple_seq;
>  typedef const struct gimple_seq_d *const_gimple_seq;
> +struct function;

... and this.

Otherwise the patch seems OK.  You need to update Makefile.in for new dependencies.

Honza



More information about the Gcc-patches mailing list