diff options
author | Martin Liska <mliska@suse.cz> | 2018-01-12 15:43:58 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-01-12 14:43:58 +0000 |
commit | b27b31dc2d160453e7b05168f1dd195e73cb176b (patch) | |
tree | a6dbb2f5ef07d7accb9a8d71b0c192cb21e1b696 /gcc/vec.c | |
parent | 4a0d0ed28fe9695b95e30b5aea4e45c78420d359 (diff) | |
download | gcc-b27b31dc2d160453e7b05168f1dd195e73cb176b.zip gcc-b27b31dc2d160453e7b05168f1dd195e73cb176b.tar.gz gcc-b27b31dc2d160453e7b05168f1dd195e73cb176b.tar.bz2 |
Fix --enable-gather-detailed-mem-stats build.
2018-01-12 Martin Liska <mliska@suse.cz>
* Makefile.in: As qsort_chk is implemented in vec.c, add
vec.o to linkage of gencfn-macros.
* tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
passing the info to record_node_allocation_statistics.
(test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
and pass the info.
* ggc-common.c (struct ggc_usage): Add operator== and use
it in operator< and compare function.
* mem-stats.h (struct mem_usage): Likewise.
* vec.c (struct vec_usage): Remove operator< and compare
function. Can be simply inherited.
From-SVN: r256582
Diffstat (limited to 'gcc/vec.c')
-rw-r--r-- | gcc/vec.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -60,15 +60,6 @@ struct vec_usage: public mem_usage : mem_usage (allocated, times, peak), m_items (items), m_items_peak (items_peak) {} - /* Comparison operator. */ - inline bool - operator< (const vec_usage &second) const - { - return (m_allocated == second.m_allocated ? - (m_peak == second.m_peak ? m_times < second.m_times - : m_peak < second.m_peak) : m_allocated < second.m_allocated); - } - /* Sum the usage with SECOND usage. */ vec_usage operator+ (const vec_usage &second) @@ -115,18 +106,6 @@ struct vec_usage: public mem_usage print_dash_line (); } - /* Compare wrapper used by qsort method. */ - static int - compare (const void *first, const void *second) - { - typedef std::pair<mem_location *, vec_usage *> mem_pair_t; - - const mem_pair_t f = *(const mem_pair_t *)first; - const mem_pair_t s = *(const mem_pair_t *)second; - - return (*f.second) < (*s.second); - } - /* Current number of items allocated. */ size_t m_items; /* Peak value of number of allocated items. */ |