This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/4] New data structure for cgraph_summary introduced.
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: mliska <mliska at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Nov 2014 16:50:41 +0100
- Subject: Re: [PATCH 2/4] New data structure for cgraph_summary introduced.
- Authentication-results: sourceware.org; auth=none
- References: <cd4c62522f43eb2d2ad92769431e91c8d8bd15bc dot 1415888515 dot git dot mliska at suse dot cz> <8d6246a176f0270dee1f5b190e8ecbddebee342f dot 1415888515 dot git dot mliska at suse dot cz>
> gcc/ChangeLog:
>
> 2014-11-12 Martin Liska <mliska@suse.cz>
>
> * Makefile.in: New object file is added.
> * cgraph.h (symbol_table::allocate_cgraph_symbol): Summary UID
> is filled up.
> * cgraph_summary.c: New file.
> * cgraph_summary.h: New file.
Since I am trying to get rid of the cgraph prefixes for symbols (keep it for
the graph only) and the summaries can be annotated to variables too. Even if it
not necessarily supported by your current implementation, lets keep API
prepared for it. So I would call it symtab-summary.* for source files and
symtab_summary for base type (probably function_summary for annotating
functions/cgraph_edge_summary for annotating edges?)
> diff --git a/gcc/cgraph.h b/gcc/cgraph.h
> index e2becb9..588b6d5 100644
> --- a/gcc/cgraph.h
> +++ b/gcc/cgraph.h
> @@ -1225,6 +1225,8 @@ public:
> int count_materialization_scale;
> /* Unique id of the node. */
> int uid;
> + /* Summary unique id of the node. */
> + int summary_uid;
What makes summary_uid better than uid?
> diff --git a/gcc/cgraph_summary.c b/gcc/cgraph_summary.c
> new file mode 100644
> index 0000000..9af1d7e
> --- /dev/null
> +++ b/gcc/cgraph_summary.c
And why do we need this file? It will need license header if really needed.
The implementation seems sane - I will check the actual uses :)
Please send the updated patch though.
Honza