From a8d9381738d229b9ebad9a91bc2cd211e368c750 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 1 Mar 2015 23:22:26 +0100 Subject: ipa-icf.c (sem_function::init): Fix formating; skip GIMPLE_PREDICT. * ipa-icf.c (sem_function::init): Fix formating; skip GIMPLE_PREDICT. (sem_item::add_expr): New function. (sem_function::hash_stmt): Handle operands of most statements. (sem_variable::get_hash): Hash the actual constructor. * ipa-icf.h (sem_item): Add add_expr. (sem_function): Update prototype of hash_stmt From-SVN: r221092 --- gcc/ipa-icf.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/ipa-icf.h') diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h index bf01cf09f21..3e5d458247c 100644 --- a/gcc/ipa-icf.h +++ b/gcc/ipa-icf.h @@ -241,6 +241,8 @@ public: protected: /* Cached, once calculated hash for the item. */ hashval_t hash; + /* Accumulate to HSTATE a hash of constructor expression EXP. */ + static void add_expr (const_tree exp, inchash::hash &hstate); private: /* Initialize internal data structures. Bitmap STACK is used for @@ -290,7 +292,7 @@ public: } /* Improve accumulated hash for HSTATE based on a gimple statement STMT. */ - void hash_stmt (inchash::hash *inchash, gimple stmt); + void hash_stmt (gimple stmt, inchash::hash &inchash); /* Return true if polymorphic comparison must be processed. */ bool compare_polymorphic_p (void); -- cgit v1.2.3