Commit 977b01e3 by Jan Hubicka Committed by Jan Hubicka

ipa-icf.c (symbol_compare_collection::symbol_compare_collection): cleanup.


	* ipa-icf.c (symbol_compare_collection::symbol_compare_collection):
	cleanup.
	(sem_function::get_hash): Do not hash DECL_DISREGARD_INLINE_LIMITS,
	DECL_DECLARED_INLINE_P and DECL_IS_OPERATOR_NEW.
	(sem_item::compare_referenced_symbol_properties): New.
	(sem_item::hash_referenced_symbol_properties): New.
	(sem_item::compare_cgraph_references): Rename to ...
	(sem_item::compare_symbol_references): ... this one; use
	compare_referenced_symbol_properties.
	(sem_function::equals_wpa): Do not compare
	DECL_DISREGARD_INLINE_LIMITS, DECL_DECLARED_INLINE_P,
	DECL_IS_OPERATOR_NEW; compare pointer sizes.
	(sem_item::update_hash_by_addr_refs): Call
	hash_referenced_symbol_properties.
	(sem_item::update_hash_by_local_refs): Cleanup.
	(sem_function::merge): Do not mix up symbol properties.
	(sem_variable::equals_wpa): Use compare_symbol_references.
	* ipa-icf.h (sem_item::compare_referenced_symbol_properties): New.
	(sem_item::hash_referenced_symbol_properties): New.
	(sem_item::compare_symbol_references): New.
	(sem_item::compare_cgraph_references): Remove.

From-SVN: r222372
parent 4cf02238
2015-04-23 Jan Hubicka <hubicka@ucw.cz>
* ipa-icf.c (symbol_compare_collection::symbol_compare_collection):
cleanup.
(sem_function::get_hash): Do not hash DECL_DISREGARD_INLINE_LIMITS,
DECL_DECLARED_INLINE_P and DECL_IS_OPERATOR_NEW.
(sem_item::compare_referenced_symbol_properties): New.
(sem_item::hash_referenced_symbol_properties): New.
(sem_item::compare_cgraph_references): Rename to ...
(sem_item::compare_symbol_references): ... this one; use
compare_referenced_symbol_properties.
(sem_function::equals_wpa): Do not compare
DECL_DISREGARD_INLINE_LIMITS, DECL_DECLARED_INLINE_P,
DECL_IS_OPERATOR_NEW; compare pointer sizes.
(sem_item::update_hash_by_addr_refs): Call
hash_referenced_symbol_properties.
(sem_item::update_hash_by_local_refs): Cleanup.
(sem_function::merge): Do not mix up symbol properties.
(sem_variable::equals_wpa): Use compare_symbol_references.
* ipa-icf.h (sem_item::compare_referenced_symbol_properties): New.
(sem_item::hash_referenced_symbol_properties): New.
(sem_item::compare_symbol_references): New.
(sem_item::compare_cgraph_references): Remove.
2015-04-23 Kwok Cheung Yeung <kcy@codesourcery.com>
PR target/26702
......
......@@ -248,10 +248,23 @@ protected:
/* Accumulate to HSTATE a hash of type T. */
static void add_type (const_tree t, inchash::hash &hstate);
/* Compare properties of symbol that does not affect semantics of symbol
itself but affects semantics of its references.
If ADDRESS is true, do extra checking needed for IPA_REF_ADDR. */
static bool compare_referenced_symbol_properties (symtab_node *used_by,
symtab_node *n1,
symtab_node *n2,
bool address);
/* Hash properties compared by compare_referenced_symbol_properties. */
void hash_referenced_symbol_properties (symtab_node *ref,
inchash::hash &hstate,
bool address);
/* For a given symbol table nodes N1 and N2, we check that FUNCTION_DECLs
point to a same function. Comparison can be skipped if IGNORED_NODES
contains these nodes. ADDRESS indicate if address is taken. */
bool compare_cgraph_references (hash_map <symtab_node *, sem_item *>
bool compare_symbol_references (hash_map <symtab_node *, sem_item *>
&ignored_nodes,
symtab_node *n1, symtab_node *n2,
bool address);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment