Come up with fast {function,call}_summary classes (PR ipa/89306).
authorMartin Liska <mliska@suse.cz>
Mon, 18 Feb 2019 08:21:23 +0000 (09:21 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 18 Feb 2019 08:21:23 +0000 (08:21 +0000)
commitdb30281f0b2ff6dfc0c4146291baf020a27e4065
tree419ecfa282d86cfaa3d74625e4883e4a619573c9
parente8cecccc2e5abb5d753291892968bf72533a7045
Come up with fast {function,call}_summary classes (PR ipa/89306).

2019-02-18  Martin Liska  <mliska@suse.cz>

PR ipa/89306
* cgraph.c (symbol_table::create_edge): Set m_summary_id to -1
by default.
(symbol_table::free_edge): Recycle m_summary_id.
* cgraph.h (get_summary_id): New.
(symbol_table::release_symbol): Set m_summary_id to -1
by default.
(symbol_table::allocate_cgraph_symbol): Recycle m_summary_id.
* ipa-fnsummary.c (ipa_fn_summary_t): Switch from
function_summary to fast_function_summary.
* ipa-fnsummary.h (ipa_fn_summary_t): Likewise.
* ipa-pure-const.c (class funct_state_summary_t):
Switch from function_summary to fast_function_summary.
* ipa-reference.c (class ipa_ref_var_info_summary_t): Likewise.
(class ipa_ref_opt_summary_t): Switch from function_summary
to fast_function_summary.
* symbol-summary.h (class function_summary_base): New class
that is created from base of former function_summary.
(function_summary_base::unregister_hooks): New.
(class function_summary): Inherit from function_summary_base.
(class call_summary_base): New class
that is created from base of former call_summary.
(class call_summary): Inherit from call_summary_base.
(struct is_same): New.
(class fast_function_summary): New summary class.
(class fast_call_summary): New summary class.
* vec.h (vec_safe_grow_cleared): New function.

From-SVN: r268979
gcc/ChangeLog
gcc/cgraph.c
gcc/cgraph.h
gcc/ipa-fnsummary.c
gcc/ipa-fnsummary.h
gcc/ipa-pure-const.c
gcc/ipa-reference.c
gcc/symbol-summary.h
gcc/vec.h