OSDN Git Service

2006-11-16 Dirk Mueller <dmueller@suse.de>
authormueller <mueller@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Nov 2006 22:07:30 +0000 (22:07 +0000)
committermueller <mueller@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Nov 2006 22:07:30 +0000 (22:07 +0000)
       * tree-vrp.c (get_value_range): Use XCNEW instead
       of XNEW and memset.
       (insert_range_assertions): Use XCNEWVEC instead
       of XNEWVEC and memset.
       (vrp_initialize): Same.
       (vrp_finalize): Same.
       * tree-ssa-ccp.c (ccp_initialize): Same.
       * predict.c (tree_bb_level_predictions): Same.
       * calls.c (expand_call): Same.
       * tree-ssa-copy.c (init_copy_prop): Same.
       (fini_copy_prop): Same.
       * tree-ssa-alias.c (get_ptr_info): Use GGC_CNEW instead
       of GGC_NEW and memset.

       * name-lookup.c (begin_scope): Use GGC_CNEW instead of
       GGC_NEW and memset.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118903 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/calls.c
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/predict.c
gcc/tree-ssa-alias.c
gcc/tree-ssa-ccp.c
gcc/tree-ssa-copy.c
gcc/tree-vrp.c

index c0cb879..f8e398d 100644 (file)
@@ -1,3 +1,19 @@
+2006-11-16  Dirk Mueller  <dmueller@suse.de>
+
+       * tree-vrp.c (get_value_range): Use XCNEW instead
+       of XNEW and memset.
+       (insert_range_assertions): Use XCNEWVEC instead
+       of XNEWVEC and memset.
+       (vrp_initialize): Same.
+       (vrp_finalize): Same.
+       * tree-ssa-ccp.c (ccp_initialize): Same.
+       * predict.c (tree_bb_level_predictions): Same.
+       * calls.c (expand_call): Same.
+       * tree-ssa-copy.c (init_copy_prop): Same.
+       (fini_copy_prop): Same.
+       * tree-ssa-alias.c (get_ptr_info): Use GGC_CNEW instead
+       of GGC_NEW and memset.
+
 2006-11-16  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR middle-end/26306
index b6f57df..bdb8167 100644 (file)
@@ -2477,9 +2477,8 @@ expand_call (tree exp, rtx target, int ignore)
                  /* Make a new map for the new argument list.  */
                  if (stack_usage_map_buf)
                    free (stack_usage_map_buf);
-                 stack_usage_map_buf = XNEWVEC (char, highest_outgoing_arg_in_use);
+                 stack_usage_map_buf = XCNEWVEC (char, highest_outgoing_arg_in_use);
                  stack_usage_map = stack_usage_map_buf;
-                 memset (stack_usage_map, 0, highest_outgoing_arg_in_use);
                  highest_outgoing_arg_in_use = 0;
                }
              allocate_dynamic_stack_space (push_size, NULL_RTX,
index 25e444c..9784458 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-16  Dirk Mueller  <dmueller@suse.de>
+
+       * name-lookup.c (begin_scope): Use GGC_CNEW instead of
+       GGC_NEW and memset.
+
 2006-11-13  Roger Sayle  <roger@eyesopen.com>
 
        * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
index 92d398a..1eb8f5d 100644 (file)
@@ -1289,11 +1289,11 @@ begin_scope (scope_kind kind, tree entity)
   if (!ENABLE_SCOPE_CHECKING && free_binding_level)
     {
       scope = free_binding_level;
+      memset (scope, 0, sizeof (cxx_scope));
       free_binding_level = scope->level_chain;
     }
   else
-    scope = GGC_NEW (cxx_scope);
-  memset (scope, 0, sizeof (cxx_scope));
+    scope = GGC_CNEW (cxx_scope);
 
   scope->this_entity = entity;
   scope->more_cleanups_ok = true;
index 5dd9e60..6b493e2 100644 (file)
@@ -1211,8 +1211,7 @@ tree_bb_level_predictions (void)
   basic_block bb;
   int *heads;
 
-  heads = XNEWVEC (int, last_basic_block);
-  memset (heads, ENTRY_BLOCK, sizeof (int) * last_basic_block);
+  heads = XCNEWVEC (int, last_basic_block);
   heads[ENTRY_BLOCK_PTR->next_bb->index] = last_basic_block;
 
   apply_return_prediction (heads);
index cf317de..18db998 100644 (file)
@@ -2465,8 +2465,7 @@ get_ptr_info (tree t)
   pi = SSA_NAME_PTR_INFO (t);
   if (pi == NULL)
     {
-      pi = GGC_NEW (struct ptr_info_def);
-      memset ((void *)pi, 0, sizeof (*pi));
+      pi = GGC_CNEW (struct ptr_info_def);
       SSA_NAME_PTR_INFO (t) = pi;
     }
 
index ca96471..9dd63fe 100644 (file)
@@ -551,8 +551,7 @@ ccp_initialize (void)
 {
   basic_block bb;
 
-  const_val = XNEWVEC (prop_value_t, num_ssa_names);
-  memset (const_val, 0, num_ssa_names * sizeof (*const_val));
+  const_val = XCNEWVEC (prop_value_t, num_ssa_names);
 
   /* Initialize simulation flags for PHI nodes and statements.  */
   FOR_EACH_BB (bb)
index f1b67b5..43172d7 100644 (file)
@@ -882,11 +882,9 @@ init_copy_prop (void)
 {
   basic_block bb;
 
-  copy_of = XNEWVEC (prop_value_t, num_ssa_names);
-  memset (copy_of, 0, num_ssa_names * sizeof (*copy_of));
+  copy_of = XCNEWVEC (prop_value_t, num_ssa_names);
 
-  cached_last_copy_of = XNEWVEC (tree, num_ssa_names);
-  memset (cached_last_copy_of, 0, num_ssa_names * sizeof (*cached_last_copy_of));
+  cached_last_copy_of = XCNEWVEC (tree, num_ssa_names);
 
   FOR_EACH_BB (bb)
     {
@@ -954,8 +952,7 @@ fini_copy_prop (void)
   
   /* Set the final copy-of value for each variable by traversing the
      copy-of chains.  */
-  tmp = XNEWVEC (prop_value_t, num_ssa_names);
-  memset (tmp, 0, num_ssa_names * sizeof (*tmp));
+  tmp = XCNEWVEC (prop_value_t, num_ssa_names);
   for (i = 1; i < num_ssa_names; i++)
     {
       tree var = ssa_name (i);
index 637263d..8b43770 100644 (file)
@@ -265,8 +265,7 @@ get_value_range (tree var)
     return vr;
 
   /* Create a default value range.  */
-  vr_value[ver] = vr = XNEW (value_range_t);
-  memset (vr, 0, sizeof (*vr));
+  vr_value[ver] = vr = XCNEW (value_range_t);
 
   /* Allocate an equivalence set.  */
   vr->equiv = BITMAP_ALLOC (NULL);
@@ -3347,8 +3346,7 @@ insert_range_assertions (void)
   sbitmap_zero (blocks_visited);
 
   need_assert_for = BITMAP_ALLOC (NULL);
-  asserts_for = XNEWVEC (assert_locus_t, num_ssa_names);
-  memset (asserts_for, 0, num_ssa_names * sizeof (assert_locus_t));
+  asserts_for = XCNEWVEC (assert_locus_t, num_ssa_names);
 
   calculate_dominance_info (CDI_DOMINATORS);
 
@@ -3486,8 +3484,7 @@ vrp_initialize (void)
 {
   basic_block bb;
 
-  vr_value = XNEWVEC (value_range_t *, num_ssa_names);
-  memset (vr_value, 0, num_ssa_names * sizeof (value_range_t *));
+  vr_value = XCNEWVEC (value_range_t *, num_ssa_names);
 
   FOR_EACH_BB (bb)
     {
@@ -4683,8 +4680,7 @@ vrp_finalize (void)
   /* We may have ended with ranges that have exactly one value.  Those
      values can be substituted as any other copy/const propagated
      value using substitute_and_fold.  */
-  single_val_range = XNEWVEC (prop_value_t, num_ssa_names);
-  memset (single_val_range, 0, num_ssa_names * sizeof (*single_val_range));
+  single_val_range = XCNEWVEC (prop_value_t, num_ssa_names);
 
   do_value_subst_p = false;
   for (i = 0; i < num_ssa_names; i++)