summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-11 11:29:02 +0000
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-11 11:29:02 +0000
commite3343fd618c0b71350d0512b7225f58d427c59b5 (patch)
tree6494a37e078dcac788db1733c9b0719609c80104
parent58db7f184f3e07b73009deb3c7151f20fcc86cdd (diff)
downloadgcc-e3343fd618c0b71350d0512b7225f58d427c59b5.tar.gz
* hash-map.h (hash_map::hash_map): Gather statistics only
when GATHER_STATISTICS is true. * hash-set.h (hash_set::hash_set): Ditto. * hash-table.h (hash_table::hash_table): Ditto. (hash_table::create_ggc): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231560 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/hash-map.h6
-rw-r--r--gcc/hash-set.h2
-rw-r--r--gcc/hash-table.h6
4 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6df230bed9e..927db65ee92 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2015-12-11 Michael Matz <matz@suse.de>
+
+ * hash-map.h (hash_map::hash_map): Gather statistics only
+ when GATHER_STATISTICS is true.
+ * hash-set.h (hash_set::hash_set): Ditto.
+ * hash-table.h (hash_table::hash_table): Ditto.
+ (hash_table::create_ggc): Ditto.
+
2015-12-11 Martin Jambor <mjambor@suse.cz>
PR ipa/68064
@@ -3242,6 +3250,7 @@
2015-11-19 Michael Matz <matz@suse.de>
+ PR rtl-optimization/68392
* fwprop.c (update_uses): Use flag_checking instead of
gcc_checking_assert.
diff --git a/gcc/hash-map.h b/gcc/hash-map.h
index b83708c54a4..81ede08e7c7 100644
--- a/gcc/hash-map.h
+++ b/gcc/hash-map.h
@@ -107,11 +107,13 @@ class GTY((user)) hash_map
public:
explicit hash_map (size_t n = 13, bool ggc = false,
- bool gather_mem_stats = true CXX_MEM_STAT_INFO)
+ bool gather_mem_stats = GATHER_STATISTICS
+ CXX_MEM_STAT_INFO)
: m_table (n, ggc, gather_mem_stats, HASH_MAP_ORIGIN PASS_MEM_STAT) {}
/* Create a hash_map in ggc memory. */
- static hash_map *create_ggc (size_t size, bool gather_mem_stats = true
+ static hash_map *create_ggc (size_t size,
+ bool gather_mem_stats = GATHER_STATISTICS
CXX_MEM_STAT_INFO)
{
hash_map *map = ggc_alloc<hash_map> ();
diff --git a/gcc/hash-set.h b/gcc/hash-set.h
index 8a7c9a00c17..602f9e7e15e 100644
--- a/gcc/hash-set.h
+++ b/gcc/hash-set.h
@@ -27,7 +27,7 @@ class hash_set
public:
typedef typename Traits::value_type Key;
explicit hash_set (size_t n = 13, bool ggc = false CXX_MEM_STAT_INFO)
- : m_table (n, ggc, true, HASH_SET_ORIGIN PASS_MEM_STAT) {}
+ : m_table (n, ggc, GATHER_STATISTICS, HASH_SET_ORIGIN PASS_MEM_STAT) {}
/* Create a hash_set in gc memory with space for at least n elements. */
diff --git a/gcc/hash-table.h b/gcc/hash-table.h
index 192be303637..85598301e9b 100644
--- a/gcc/hash-table.h
+++ b/gcc/hash-table.h
@@ -361,7 +361,8 @@ class hash_table
typedef typename Descriptor::compare_type compare_type;
public:
- explicit hash_table (size_t, bool ggc = false, bool gather_mem_stats = true,
+ explicit hash_table (size_t, bool ggc = false,
+ bool gather_mem_stats = GATHER_STATISTICS,
mem_alloc_origin origin = HASH_TABLE_ORIGIN
CXX_MEM_STAT_INFO);
~hash_table ();
@@ -371,7 +372,8 @@ public:
create_ggc (size_t n CXX_MEM_STAT_INFO)
{
hash_table *table = ggc_alloc<hash_table> ();
- new (table) hash_table (n, true, true, HASH_TABLE_ORIGIN PASS_MEM_STAT);
+ new (table) hash_table (n, true, GATHER_STATISTICS,
+ HASH_TABLE_ORIGIN PASS_MEM_STAT);
return table;
}