diff options
author | Martin Liska <mliska@suse.cz> | 2018-08-31 13:37:09 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-08-31 11:37:09 +0000 |
commit | 6c72e55df00195f1c955e7ffdd76386613f69560 (patch) | |
tree | 336c18e36fce422c94a0c239d4c005749839b801 /gcc/ipa-icf.c | |
parent | 5020c88e539e0212beec3568fb088ab95f484022 (diff) | |
download | gcc-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.c')
-rw-r--r-- | gcc/ipa-icf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 39b96ba..8a6a7a3f 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -227,6 +227,8 @@ void sem_item::set_hash (hashval_t hash) m_hash_set = true; } +hash_map<const_tree, hashval_t> sem_item::m_type_hash_cache; + /* Semantic function constructor that uses STACK as bitmap memory stack. */ sem_function::sem_function (bitmap_obstack *stack) @@ -1587,7 +1589,7 @@ sem_item::add_type (const_tree type, inchash::hash &hstate) return; } - hashval_t *val = optimizer->m_type_hash_cache.get (type); + hashval_t *val = m_type_hash_cache.get (type); if (!val) { @@ -1607,7 +1609,7 @@ sem_item::add_type (const_tree type, inchash::hash &hstate) hstate2.add_int (nf); hash = hstate2.end (); hstate.add_hwi (hash); - optimizer->m_type_hash_cache.put (type, hash); + m_type_hash_cache.put (type, hash); } else hstate.add_hwi (*val); |