r185515 - in /branches/google/gcc-4_6: function...
tmsriram@gcc.gnu.org
tmsriram@gcc.gnu.org
Mon Mar 19 03:08:00 GMT 2012
Author: tmsriram
Date: Mon Mar 19 03:08:20 2012
New Revision: 185515
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185515
Log:
This patch overloads GCC option -freorder-functions with -freoder-functions=*
which will invoke the linker plugin libfunction_reordering_plugin.so. For now,
the only accepted option is -freoder-functions=cgedge, where the functions which
are connected by hot callgraph edges are placed closer. When
-freorder-functions is specified without the '=', the original behaviour is
maintained. This patch also removes the -fcallgraph-profiles-sections option.
2012-03-18 Sriraman Tallam <tmsriram@google.com>
* cgraphbuild.c (remove_cgraph_callee_edges): Replace
flag_callgraph_profiles_sections with flag_reorder_functions.
* final.c (rest_of_handle_final): Ditto.
* configure: Regenerate.
* config.in: undef FRPLUGINSONAME.
* congifure.ac: Define FRPLUGINSONAME.
* config.host: Set host_function_reordering_plugin_soname.
* gcc.c: Invoke function_reordering linker plugin with
-freorder-functions=* option.
(set_func_reorder_linker_plugin_spec): New function.
(main): Call set_func_reorder_linker_plugin_spec when
-freorder-functions=* option is seen.
* common.opt (fcallgraph-profiles-sections): Remove.
(freorder-functions=): New option.
* testsuite/g++.dg/tree-prof/callgraph-profiles.C: Replace
-fcallgraph-profiles-sections with -freorder-functions=callgraph.
* opts.c (finish_options): Turn on -ffunction-sections when
-freorder-functions= is used.
* doc/invoke.texi (freorder-functions=): Document option
-freorder-functions=.
* function_reordering_plugin.c (register_claim_file_hook): New function
pointer.
(register_all_symbols_read_hook): Ditto.
(no_op): New global.
(out_file): Make static.
(is_api_exist): Make static.
(process_option): New function.
(onload): Return if no_op is set. Do not register handlers until
necessary.
(get_load): Check if out_file is NULL before opening & closing the
file.
* callgraph.c (find_pettis_hansen_function_layout):
(get_layout): Dump only when fp is not NULL.
Modified:
branches/google/gcc-4_6/function_reordering_plugin/ChangeLog.google-4_6
branches/google/gcc-4_6/function_reordering_plugin/callgraph.c
branches/google/gcc-4_6/function_reordering_plugin/function_reordering_plugin.c
branches/google/gcc-4_6/gcc/ChangeLog.google-4_6
branches/google/gcc-4_6/gcc/cgraphbuild.c
branches/google/gcc-4_6/gcc/common.opt
branches/google/gcc-4_6/gcc/config.host
branches/google/gcc-4_6/gcc/config.in
branches/google/gcc-4_6/gcc/configure
branches/google/gcc-4_6/gcc/configure.ac
branches/google/gcc-4_6/gcc/doc/invoke.texi
branches/google/gcc-4_6/gcc/final.c
branches/google/gcc-4_6/gcc/gcc.c
branches/google/gcc-4_6/gcc/opts.c
branches/google/gcc-4_6/gcc/testsuite/g++.dg/tree-prof/callgraph-profiles.C
More information about the Gcc-cvs
mailing list