This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch][google gcc-4_8] Make AutoFDO and plugin based function layout work.
- From: Xinliang David Li <davidxl at google dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: Dehao Chen <dehao at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 26 Nov 2013 18:50:39 -0800
- Subject: Re: [patch][google gcc-4_8] Make AutoFDO and plugin based function layout work.
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8Hmz4kRG0UT6gLCy4BD+d9qco7TQccJpDm4q4CmADjsWpUQ at mail dot gmail dot com>
Ok.
David
On Tue, Nov 26, 2013 at 6:44 PM, Sriraman Tallam <tmsriram@google.com> wrote:
> Google ref b/11631232
>
> With AutoFDO, the .gnu.callgraph sections are not emitted with option
> -freorder-functions=callgraph. This simple patch fixes it.
>
> Index: final.c
> ===================================================================
> --- final.c (revision 205418)
> +++ final.c (working copy)
> @@ -4471,7 +4471,7 @@
> /* With -fcallgraph-profiles-sections and -freorder-functions=,
> add ".gnu.callgraph.text" section for storing profiling information. */
> if ((flag_reorder_functions > 1)
> - && flag_profile_use
> + && (flag_profile_use || flag_auto_profile)
> && cgraph_get_node (current_function_decl) != NULL
> && ((cgraph_get_node (current_function_decl))->callees != NULL
> || (cgraph_get_node (current_function_decl))->count > 0))
>
> Ok to commit?
>
> Sri