aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-09-02 20:32:49 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2004-09-02 18:32:49 +0000
commit0772402279c0161fe41784911b52c77e12803c42 (patch)
tree6bf7983f3f95c6b710f8803d101e0114ac581cfb /gcc/gimplify.c
parent35dc4c015a0b6e0558a892bbbcca2cc73e435f61 (diff)
downloadgcc-0772402279c0161fe41784911b52c77e12803c42.zip
gcc-0772402279c0161fe41784911b52c77e12803c42.tar.gz
gcc-0772402279c0161fe41784911b52c77e12803c42.tar.bz2
gimplify.c (gimplify_compound_lval): Move "stack" varray out of GGC.
* gimplify.c (gimplify_compound_lval): Move "stack" varray out of GGC. * ggc-page.c: include tree-flow.h. (extra_order_size_table): Add stmt_ann_d. (STAT_LABEL): Rename from .... (LABEL): ... this one. * Makefile.in (ggc-page.o): Add dependency. * ggc-common.c (ggc_force_collect): New global variable. (loc_description): Add fields "freed", "collected" (ptr_hash): New static hash (ptr_hash_entry): New structure. (hash_ptr,eq_ptr,ggc_prune_ptr): New static functions. (ggc_record_overhead): Take ptr argument, record it (ggc_prune_overhead_list, ggc_free_overhead): New functions. (cmp_statistics): Imrove sorting. (dump_ggc_loc_statistics): Output newly collected statistics * ggc-page.c (ggc_alloc): Update call of ggc_record_overhead (ggc_free): Call ggc_free_overhead. (ggc_collect): Force collection when asked to be forced. (ggc_collect): Call ggc_prune_overhead_list. * ggc.h (ggc_force_collect): Declare (ggc_record_overhead): Update prototype. (ggc_free_overhead, ggc_prune_overhead_list): Declare. From-SVN: r86974
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 050f97c..1ba8cad 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1466,8 +1466,11 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p,
int i;
/* Create a stack of the subexpressions so later we can walk them in
- order from inner to outer. */
- VARRAY_TREE_INIT (stack, 10, "stack");
+ order from inner to outer.
+
+ This array is very memory consuming. Don't even think of making
+ it VARRAY_TREE. */
+ VARRAY_GENERIC_PTR_NOGC_INIT (stack, 10, "stack");
/* We can either handle REALPART_EXPR, IMAGEPART_EXPR anything that
handled_components can deal with. */
@@ -1475,7 +1478,7 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p,
(handled_component_p (*p)
|| TREE_CODE (*p) == REALPART_EXPR || TREE_CODE (*p) == IMAGPART_EXPR);
p = &TREE_OPERAND (*p, 0))
- VARRAY_PUSH_TREE (stack, *p);
+ VARRAY_PUSH_GENERIC_PTR_NOGC (stack, *p);
#if defined ENABLE_CHECKING
if (VARRAY_ACTIVE_SIZE (stack) == 0)
@@ -1496,7 +1499,7 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p,
then we gimplify any indices, from left to right. */
for (i = VARRAY_ACTIVE_SIZE (stack) - 1; i >= 0; i--)
{
- tree t = VARRAY_TREE (stack, i);
+ tree t = VARRAY_GENERIC_PTR_NOGC (stack, i);
if (TREE_CODE (t) == ARRAY_REF || TREE_CODE (t) == ARRAY_RANGE_REF)
{
@@ -1615,6 +1618,8 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p,
ret = MIN (ret, GS_OK);
}
+ VARRAY_FREE (stack);
+
return ret;
}