aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-icf.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-08-31 13:37:09 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-08-31 11:37:09 +0000
commit6c72e55df00195f1c955e7ffdd76386613f69560 (patch)
tree336c18e36fce422c94a0c239d4c005749839b801 /gcc/ipa-icf.h
parent5020c88e539e0212beec3568fb088ab95f484022 (diff)
downloadgcc-6c72e55df00195f1c955e7ffdd76386613f69560.zip
gcc-6c72e55df00195f1c955e7ffdd76386613f69560.tar.gz
gcc-6c72e55df00195f1c955e7ffdd76386613f69560.tar.bz2
IPA ICF: make type cache a static field sem_item.
2018-08-31 Martin Liska <mliska@suse.cz> * ipa-icf.c (sem_item::add_type): Use sem_item::m_type_hash_cache. * ipa-icf.h: Move the cache from sem_item_optimizer to sem_item. From-SVN: r264014
Diffstat (limited to 'gcc/ipa-icf.h')
-rw-r--r--gcc/ipa-icf.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h
index 622aebc..a64b385 100644
--- a/gcc/ipa-icf.h
+++ b/gcc/ipa-icf.h
@@ -281,6 +281,9 @@ private:
/* Initialize internal data structures. Bitmap STACK is used for
bitmap memory allocation process. */
void setup (bitmap_obstack *stack);
+
+ /* Because types can be arbitrarily large, avoid quadratic bottleneck. */
+ static hash_map<const_tree, hashval_t> m_type_hash_cache;
}; // class sem_item
class sem_function: public sem_item
@@ -524,9 +527,6 @@ public:
/* Gets a congruence class group based on given HASH value and TYPE. */
congruence_class_group *get_group_by_hash (hashval_t hash,
sem_item_type type);
-
- /* Because types can be arbitrarily large, avoid quadratic bottleneck. */
- hash_map<const_tree, hashval_t> m_type_hash_cache;
private:
/* For each semantic item, append hash values of references. */