This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch][google gcc-4_8] Make AutoFDO and plugin based function layout work.
- From: Sriraman Tallam <tmsriram at google dot com>
- To: Dehao Chen <dehao at google dot com>, David Li <davidxl at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 26 Nov 2013 18:44:25 -0800
- Subject: [patch][google gcc-4_8] Make AutoFDO and plugin based function layout work.
- Authentication-results: sourceware.org; auth=none
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