diff options
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 5ce032e1e57..ecafe63a536 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -1579,9 +1579,14 @@ struct GTY(()) cgraph_indirect_call_info unsigned agg_contents : 1; /* Set when this is a call through a member pointer. */ unsigned member_ptr : 1; - /* When the previous bit is set, this one determines whether the destination - is loaded from a parameter passed by reference. */ + /* When the agg_contents bit is set, this one determines whether the + destination is loaded from a parameter passed by reference. */ unsigned by_ref : 1; + /* When the agg_contents bit is set, this one determines whether we can + deduce from the function body that the loaded value from the reference is + never modified between the invocation of the function and the load + point. */ + unsigned guaranteed_unmodified : 1; /* For polymorphic calls this specify whether the virtual table pointer may have changed in between function entry and the call. */ unsigned vptr_changed : 1; @@ -2299,6 +2304,7 @@ void cgraphunit_c_finalize (void); IN_SSA is true if the gimple is in SSA. */ basic_block init_lowered_empty_function (tree, bool, gcov_type); +tree thunk_adjust (gimple_stmt_iterator *, tree, bool, HOST_WIDE_INT, tree); /* In cgraphclones.c */ tree clone_function_name_1 (const char *, const char *); @@ -3096,8 +3102,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 +3110,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 +3131,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 +3152,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; |