re PR ipa/68035 (ipa performance issue when no procedures are present)
authorMartin Liska <mliska@suse.cz>
Thu, 12 Nov 2015 15:16:00 +0000 (16:16 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 12 Nov 2015 15:16:00 +0000 (15:16 +0000)
commit808b6bb7a8a4c30ac6f375ca2f6f0cb72fb3e766
tree9c0e3a01a29255ea0316cfea7a3a7ce1fd63979b
parentc2a12ca06dd0762c03ec8f0f3be3feb096119386
re PR ipa/68035 (ipa performance issue when no procedures are present)

Fix PR ipa/68035

PR ipa/68035
* ipa-icf.c (void sem_item::set_hash): New function.
(sem_function::get_hash): Use renamed m_hash member variable.
(sem_item::update_hash_by_addr_refs): Utilize get_hash.
(sem_item::update_hash_by_local_refs): Likewise.
(sem_variable::get_hash): Use renamed m_hash member variable.
(sem_item_optimizer::update_hash_by_addr_refs): Utilize get_hash.
(sem_item_optimizer::build_hash_based_classes): Utilize set_hash.
(sem_item_optimizer::build_graph): As the hash value of an item
is lazy initialized, force the calculation.
* ipa-icf.h (set_hash): Declare new function and rename hash member
variable to m_hash.
* gcc.dg/ipa/pr68035.c: New test.

From-SVN: r230263
gcc/ChangeLog
gcc/ipa-icf.c
gcc/ipa-icf.h
gcc/testsuite/ChangeLog