From 1ede94c55982638a877e0ecad794cbe7d1a54a20 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 17 Feb 2015 22:57:53 +0100 Subject: ipa-visibility.c (function_and_variable_visibility): Only check locality if node is not already local. * ipa-visibility.c (function_and_variable_visibility): Only check locality if node is not already local. * ipa-inline.c (want_inline_function_to_all_callers_p): Use call_for_symbol_and_aliases instead of call_for_symbol_thunks_and_aliases. (ipa_inline): Likewise. * cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): first walk aliases. * ipa.c (symbol_table::remove_unreachable_nodes): Use call_for_symbol_and_aliases. * ipa-profile.c (ipa_propagate_frequency_data): Add function_symbol. (ipa_propagate_frequency_1): Use it; use opt_for_fn (ipa_propagate_frequency): Update. (ipa_profile): Add opt_for_fn gueards. From-SVN: r220775 --- gcc/cgraph.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'gcc/cgraph.c') diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 3548bd0757d..1ad08dc7631 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2191,6 +2191,16 @@ cgraph_node::call_for_symbol_thunks_and_aliases (bool (*callback) if (callback (this, data)) return true; + FOR_EACH_ALIAS (this, ref) + { + cgraph_node *alias = dyn_cast (ref->referring); + if (include_overwritable + || alias->get_availability () > AVAIL_INTERPOSABLE) + if (alias->call_for_symbol_thunks_and_aliases (callback, data, + include_overwritable, + exclude_virtual_thunks)) + return true; + } for (e = callers; e; e = e->next_caller) if (e->caller->thunk.thunk_p && (include_overwritable @@ -2202,16 +2212,6 @@ cgraph_node::call_for_symbol_thunks_and_aliases (bool (*callback) exclude_virtual_thunks)) return true; - FOR_EACH_ALIAS (this, ref) - { - cgraph_node *alias = dyn_cast (ref->referring); - if (include_overwritable - || alias->get_availability () > AVAIL_INTERPOSABLE) - if (alias->call_for_symbol_thunks_and_aliases (callback, data, - include_overwritable, - exclude_virtual_thunks)) - return true; - } return false; } -- cgit v1.2.1