Merge ipa-profile pass from pretty-ipa

H.J. Lu hjl.tools@gmail.com
Wed Apr 28 22:09:00 GMT 2010


On Tue, Apr 27, 2010 at 6:09 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch adds simple pass propagating node frequencies across callgraph.  The
> pass is able to determine that functions called only from called once that are
> not called inside loop are called once and similar simple analysis.  The
> savings are pretty small (about 1-4% on usual spec2000 benchmark, we get lucky
> in some cases but those tends to be the simple benchmarks, like gzip), but the
> pass is easy too and excercise the profile hot/cold infrastructure more
> On SPEC2000 GCC in whole program mode this affects about 300 functions.
>
> Bootstrapped/regtested x86_64-linux, will commit it later today if there
> are no complains.
>
> 2010-04-18 Jan Hubicka  <jh@suse.cz>
>
>        * doc/invoke.texi (-fipa-profile): Document.
>        * opts.c (decode_options): Enable ipa-profile at -O1.
>        * timevar.def (TV_IPA_PROFILE): Define.
>        * common.opt (fipa-profile): Add.
>        * cgraph.c (cgraph_clone_node): Set local flag and clear vtable method flag
>        for clones.
>        (cgraph_propagate_frequency): Handle only local ones.
>        * tree-pass.h (pass_ipa_profile): Declare.
>        * ipa-profile.c (gate_profile): Use flag_ipa_profile.
>        (pass_ipa_profile): Use TV_IPA_PROFILE.
>        * ipa.c (ipa_profile): New function.
>        (gate_ipa_profile): Likewise.
>        (pass_ipa_profile): New global variable.
>        * passes.c (pass_ipa_profile): New.

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43924


H.J.



More information about the Gcc-patches mailing list