This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [google] Add options to pattern match function name for hotness attributes
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Dehao Chen <dehao at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, David Li <davidxl at google dot com>
- Date: Sat, 2 Jun 2012 11:36:30 +0200
- Subject: Re: [google] Add options to pattern match function name for hotness attributes
- References: <CAO2gOZUrnW+V-wUbZ5vLCN5yne+uivUtpptzemkrRU5o5UhFLg@mail.gmail.com>
> Hi,
>
> This patch adds 4 flags to enable user to type in a list of name
> patterns. Compiler will match the function name with the given
> patterns, and add "hot", "cold", "likely_hot", "likely_cold"
> attributes to function declaration. The static branch prediction
> checks if a basic block contains call to a annotated function, and set
> the branch probability accordingly.
>
> Bootstrapped and passed gcc testsuites.
>
> Ok for google branches?
Just out of curiosity, what is main advantage of this over annotating your source?
Honza