Commit b3587b99 by Jan Hubicka Committed by Jan Hubicka

ipa-icf.c (sem_item::compare_attributes): New function.


	* ipa-icf.c (sem_item::compare_attributes): New function.
	(sem_item::compare_referenced_symbol_properties): Compare variable
	attributes.
	(sem_item::hash_referenced_symbol_properties): Record DECL_ALIGN.
	(sem_function::param_used_p): New function.
	(sem_function::equals_wpa): Fix attribute comparsion; match
	parameter type codes; do not compare paremter flags when
	they are not used; compare edge flags; compare indirect calls.
	(sem_item::update_hash_by_addr_refs): Hash reference type.
	(sem_function::equals_private): Do not match DECL_ATTRIBUTES.
	(sem_variable::equals_wpa): Do not match DECL_ALIGN; match
	reference use type.
	(sem_item_optimizer::update_hash_by_addr_refs): Use param_used_p.
	* ipa-icf.h (compare_attributes, param_used_p): Declare.

From-SVN: r222374
parent 9f468990
2015-04-23 Jan Hubicka <hubicka@ucw.cz> 2015-04-23 Jan Hubicka <hubicka@ucw.cz>
* ipa-icf.c (sem_item::compare_attributes): New function.
(sem_item::compare_referenced_symbol_properties): Compare variable
attributes.
(sem_item::hash_referenced_symbol_properties): Record DECL_ALIGN.
(sem_function::param_used_p): New function.
(sem_function::equals_wpa): Fix attribute comparsion; match
parameter type codes; do not compare paremter flags when
they are not used; compare edge flags; compare indirect calls.
(sem_item::update_hash_by_addr_refs): Hash reference type.
(sem_function::equals_private): Do not match DECL_ATTRIBUTES.
(sem_variable::equals_wpa): Do not match DECL_ALIGN; match
reference use type.
(sem_item_optimizer::update_hash_by_addr_refs): Use param_used_p.
* ipa-icf.h (compare_attributes, param_used_p): Declare.
2015-04-23 Jan Hubicka <hubicka@ucw.cz>
* ipa-icf.c (symbol_compare_collection::symbol_compare_collection): * ipa-icf.c (symbol_compare_collection::symbol_compare_collection):
cleanup. cleanup.
(sem_function::get_hash): Do not hash DECL_DISREGARD_INLINE_LIMITS, (sem_function::get_hash): Do not hash DECL_DISREGARD_INLINE_LIMITS,
......
...@@ -256,6 +256,9 @@ protected: ...@@ -256,6 +256,9 @@ protected:
symtab_node *n2, symtab_node *n2,
bool address); bool address);
/* Compare two attribute lists. */
static bool compare_attributes (const_tree list1, const_tree list2);
/* Hash properties compared by compare_referenced_symbol_properties. */ /* Hash properties compared by compare_referenced_symbol_properties. */
void hash_referenced_symbol_properties (symtab_node *ref, void hash_referenced_symbol_properties (symtab_node *ref,
inchash::hash &hstate, inchash::hash &hstate,
...@@ -356,6 +359,9 @@ public: ...@@ -356,6 +359,9 @@ public:
/* Array of structures for all basic blocks. */ /* Array of structures for all basic blocks. */
vec <ipa_icf_gimple::sem_bb *> bb_sorted; vec <ipa_icf_gimple::sem_bb *> bb_sorted;
/* Return true if parameter I may be used. */
bool param_used_p (unsigned int i);
private: private:
/* Calculates hash value based on a BASIC_BLOCK. */ /* Calculates hash value based on a BASIC_BLOCK. */
hashval_t get_bb_hash (const ipa_icf_gimple::sem_bb *basic_block); hashval_t get_bb_hash (const ipa_icf_gimple::sem_bb *basic_block);
......
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