diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-03 17:37:45 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-03 16:37:45 +0000 |
commit | ac6f2e594886e2209446114023ecdff96b0bd7c4 (patch) | |
tree | 08ad05645f41cd3331fef1728530f56b00673203 /gcc/ipa-prop.h | |
parent | 360386c7ef1c3fa30de216b1d68ed6a27296fd80 (diff) | |
download | gcc-ac6f2e594886e2209446114023ecdff96b0bd7c4.zip gcc-ac6f2e594886e2209446114023ecdff96b0bd7c4.tar.gz gcc-ac6f2e594886e2209446114023ecdff96b0bd7c4.tar.bz2 |
ipa-fnsummary.c (ipa_call_context::duplicate_from): New member function.
* ipa-fnsummary.c (ipa_call_context::duplicate_from): New
member function.
(ipa_call_context::release): Add ALL parameter.
(ipa_call_context::equal_to): New member function.
* ipa-fnsummary.h (ipa_call_context): Add empty constructor;
duplicate_form, release, equal_to and exists_p member functoins.
* ipa-inline-analysis.c (node_context_cache_entry): New
class.
(node_context_summary): Likewise.
(node_context_cache, node_context_cache_hit, node_context_cache_miss,
node_context_clear): New static vars.
(initialize_growth_caches): New function.
(free_growth_caches): Also delete node_context_cache; output stats.
(do_estimate_edge_time): Cache contexts.
(reset_node_cache): New function.
* ipa-inline.c (reset_edge_caches): Reset also node cache.
(inline_small_functions): Initialize growth caches.
* ipa-inline.h (reset_node_cache, initialize_growth_caches):
Declare.
* ipa-predicate.h (inline_param_summary::equal_to): New.
* ipa-prop.c (ipa_agg_jf_item::equal_to): New.
* ipa-prop.h (ipa_agg_jf_item): Declare equal_to member function.
(ipa_agg_jump_function): Implement equal_to member function.
From-SVN: r277757
Diffstat (limited to 'gcc/ipa-prop.h')
-rw-r--r-- | gcc/ipa-prop.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 07a7eea..121d0f6 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -127,6 +127,9 @@ struct GTY(()) ipa_agg_jf_item /* The known constant or type if this is a clobber. */ tree value; + + /* Return true if OTHER describes same agg item. */ + bool equal_to (const ipa_agg_jf_item &other); }; @@ -139,6 +142,23 @@ struct GTY(()) ipa_agg_jump_function vec<ipa_agg_jf_item, va_gc> *items; /* True if the data was passed by reference (as opposed to by value). */ bool by_ref; + + /* Return true if OTHER describes same agg items. */ + bool equal_to (const ipa_agg_jump_function &other) + { + if (by_ref != other.by_ref) + return false; + if (items != NULL && other.items == NULL) + return false; + if (!items) + return other.items == NULL; + if (items->length () != other.items->length ()) + return false; + for (unsigned int i = 0; i < items->length (); i++) + if (!(*items)[i].equal_to ((*other.items)[i])) + return false; + return true; + } }; typedef struct ipa_agg_jump_function *ipa_agg_jump_function_p; |