aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-05-04 18:36:51 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2016-05-04 16:36:51 +0000
commit6b715bf6d991249181ce532442fa5513e137f708 (patch)
tree9eaf587465ab186e64c5890827bfe771bf2b2f5c /gcc/cgraph.h
parentdeef71132774618d06d571e935d10753f92d8ad9 (diff)
downloadgcc-6b715bf6d991249181ce532442fa5513e137f708.zip
gcc-6b715bf6d991249181ce532442fa5513e137f708.tar.gz
gcc-6b715bf6d991249181ce532442fa5513e137f708.tar.bz2
cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): Check availability on NODE, too.
* cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): Check availability on NODE, too. * cgraph.h (symtab_node::call_for_symbol_and_aliases): Likewise. (cgraph_node::call_for_symbol_and_aliases): Likewise. (varpool_node::call_for_symbol_and_aliase): Likewise. * ipa-pure-const.c (add_new_function): Analyze all bodies. (propagate_pure_const): Propagate across interposable functions, too. (skip_function_for_local_pure_const): Do not skip interposable bodies with aliases. (pass_local_pure_const::execute): Update. * gcc.dg/ipa/pure-const-3.c: New testcase. From-SVN: r235887
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 5ce032e..d714ad7 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -3096,8 +3096,7 @@ symtab_node::get_availability (symtab_node *ref)
}
/* Call calback on symtab node and aliases associated to this node.
- When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
- skipped. */
+ When INCLUDE_OVERWRITABLE is false, overwritable symbols are skipped. */
inline bool
symtab_node::call_for_symbol_and_aliases (bool (*callback) (symtab_node *,
@@ -3105,15 +3104,19 @@ symtab_node::call_for_symbol_and_aliases (bool (*callback) (symtab_node *,
void *data,
bool include_overwritable)
{
- if (callback (this, data))
- return true;
+ if (include_overwritable
+ || get_availability () > AVAIL_INTERPOSABLE)
+ {
+ if (callback (this, data))
+ return true;
+ }
if (has_aliases_p ())
return call_for_symbol_and_aliases_1 (callback, data, include_overwritable);
return false;
}
/* Call callback on function and aliases associated to the function.
- When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
+ When INCLUDE_OVERWRITABLE is false, overwritable symbols are
skipped. */
inline bool
@@ -3122,15 +3125,19 @@ cgraph_node::call_for_symbol_and_aliases (bool (*callback) (cgraph_node *,
void *data,
bool include_overwritable)
{
- if (callback (this, data))
- return true;
+ if (include_overwritable
+ || get_availability () > AVAIL_INTERPOSABLE)
+ {
+ if (callback (this, data))
+ return true;
+ }
if (has_aliases_p ())
return call_for_symbol_and_aliases_1 (callback, data, include_overwritable);
return false;
}
/* Call calback on varpool symbol and aliases associated to varpool symbol.
- When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
+ When INCLUDE_OVERWRITABLE is false, overwritable symbols are
skipped. */
inline bool
@@ -3139,8 +3146,12 @@ varpool_node::call_for_symbol_and_aliases (bool (*callback) (varpool_node *,
void *data,
bool include_overwritable)
{
- if (callback (this, data))
- return true;
+ if (include_overwritable
+ || get_availability () > AVAIL_INTERPOSABLE)
+ {
+ if (callback (this, data))
+ return true;
+ }
if (has_aliases_p ())
return call_for_symbol_and_aliases_1 (callback, data, include_overwritable);
return false;