diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-07 02:14:58 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-07 02:14:58 +0000 |
commit | ea7d8c7a9c53e45fa4482196a935142467a82403 (patch) | |
tree | c97833ceb01a286f01ced7b954c325c8d001d804 | |
parent | dc7cdd37ee1a4fc369a582df56a4aa0e32baede3 (diff) | |
download | gcc-ea7d8c7a9c53e45fa4482196a935142467a82403.tar.gz |
* parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
* ggc.h (ggc_internal_cleared_alloc): New macro.
* vec.h (vec_safe_copy): Handle memory stats.
* omp-low.c (simd_clone_struct_alloc): Use ggc_internal_cleared_alloc.
* target-globals.c (save_target_globals): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207588 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/parser.c | 2 | ||||
-rw-r--r-- | gcc/ggc.h | 1 | ||||
-rw-r--r-- | gcc/omp-low.c | 2 | ||||
-rw-r--r-- | gcc/target-globals.c | 24 | ||||
-rw-r--r-- | gcc/vec.h | 4 |
7 files changed, 25 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a389639d05..73a9bd7df50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,11 @@ -2014-02-06 Jakub Jelinek <jakub@redhat.com> +2014-02-06 Jan Hubicka <hubicka@ucw.cz> + + * ggc.h (ggc_internal_cleared_alloc): New macro. + * vec.h (vec_safe_copy): Handle memory stats. + * omp-low.c (simd_clone_struct_alloc): Use ggc_internal_cleared_alloc. + * target-globals.c (save_target_globals): Likewise. + +2014-02-06 Jan Hubicka <hubicka@ucw.cz> PR target/60077 * expr.c (emit_move_resolve_push): Export; be bit more selective diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 60651c59f64..6bb1115fad6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2014-02-05 Jan Hubicka <hubicka@ucw.cz + + * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec. + 2014-02-05 Jakub Jelinek <jakub@redhat.com> PR c++/58703 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 392acf277c5..f0722d6bf7b 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -31957,7 +31957,7 @@ synthesize_implicit_template_parm (cp_parser *parser) { tree& new_parms = INNERMOST_TEMPLATE_PARMS (current_template_parms); int new_parm_idx = TREE_VEC_LENGTH (new_parms); - new_parms = grow_tree_vec_stat (new_parms, new_parm_idx + 1); + new_parms = grow_tree_vec (new_parms, new_parm_idx + 1); TREE_VEC_ELT (new_parms, new_parm_idx) = parser->implicit_template_parms; } diff --git a/gcc/ggc.h b/gcc/ggc.h index 49f0c37950d..55f3fe9b0bc 100644 --- a/gcc/ggc.h +++ b/gcc/ggc.h @@ -146,6 +146,7 @@ extern size_t ggc_round_alloc_size (size_t requested_size); /* Allocates cleared memory. */ extern void *ggc_internal_cleared_alloc_stat (size_t MEM_STAT_DECL) ATTRIBUTE_MALLOC; +#define ggc_internal_cleared_alloc(s) ggc_internal_cleared_alloc_stat (s MEM_STAT_INFO) /* Resize a block. */ extern void *ggc_realloc_stat (void *, size_t MEM_STAT_DECL); diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 3750ceb5e8d..2c35751a957 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -10649,7 +10649,7 @@ simd_clone_struct_alloc (int nargs) size_t len = (sizeof (struct cgraph_simd_clone) + nargs * sizeof (struct cgraph_simd_clone_arg)); clone_info = (struct cgraph_simd_clone *) - ggc_internal_cleared_alloc_stat (len PASS_MEM_STAT); + ggc_internal_cleared_alloc (len); return clone_info; } diff --git a/gcc/target-globals.c b/gcc/target-globals.c index 8d3eaa89041..7cf95aeeddf 100644 --- a/gcc/target-globals.c +++ b/gcc/target-globals.c @@ -79,29 +79,21 @@ save_target_globals (void) struct target_lower_subreg lower_subreg; } *p; p = (struct target_globals_extra *) - ggc_internal_cleared_alloc_stat (sizeof (struct target_globals_extra) - PASS_MEM_STAT); + ggc_internal_cleared_alloc (sizeof (struct target_globals_extra)); g = (struct target_globals *) p; g->flag_state = &p->flag_state; - g->regs = ggc_internal_cleared_alloc_stat (sizeof (struct target_regs) - PASS_MEM_STAT); + g->regs = ggc_internal_cleared_alloc (sizeof (struct target_regs)); g->rtl = ggc_alloc_cleared_target_rtl (); g->hard_regs - = ggc_internal_cleared_alloc_stat (sizeof (struct target_hard_regs) - PASS_MEM_STAT); - g->reload = ggc_internal_cleared_alloc_stat (sizeof (struct target_reload) - PASS_MEM_STAT); - g->expmed = ggc_internal_cleared_alloc_stat (sizeof (struct target_expmed) - PASS_MEM_STAT); + = ggc_internal_cleared_alloc (sizeof (struct target_hard_regs)); + g->reload = ggc_internal_cleared_alloc (sizeof (struct target_reload)); + g->expmed = ggc_internal_cleared_alloc (sizeof (struct target_expmed)); g->optabs = &p->optabs; g->libfuncs = ggc_alloc_cleared_target_libfuncs (); g->cfgloop = &p->cfgloop; - g->ira = ggc_internal_cleared_alloc_stat (sizeof (struct target_ira) - PASS_MEM_STAT); - g->ira_int = ggc_internal_cleared_alloc_stat (sizeof (struct target_ira_int) - PASS_MEM_STAT); - g->lra_int = ggc_internal_cleared_alloc_stat (sizeof (struct target_lra_int) - PASS_MEM_STAT); + g->ira = ggc_internal_cleared_alloc (sizeof (struct target_ira)); + g->ira_int = ggc_internal_cleared_alloc (sizeof (struct target_ira_int)); + g->lra_int = ggc_internal_cleared_alloc (sizeof (struct target_lra_int)); g->builtins = &p->builtins; g->gcse = &p->gcse; g->bb_reorder = &p->bb_reorder; diff --git a/gcc/vec.h b/gcc/vec.h index 4e8e3b877d4..cb4ba632869 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -679,9 +679,9 @@ vec_safe_truncate (vec<T, A, vl_embed> *v, unsigned size) /* If SRC is not NULL, return a pointer to a copy of it. */ template<typename T, typename A> inline vec<T, A, vl_embed> * -vec_safe_copy (vec<T, A, vl_embed> *src) +vec_safe_copy (vec<T, A, vl_embed> *src CXX_MEM_STAT_INFO) { - return src ? src->copy () : NULL; + return src ? src->copy (ALONE_PASS_MEM_STAT) : NULL; } /* Copy the elements from SRC to the end of DST as if by memcpy. |