alias.c (init_alias_analysis): Use ggc_calloc instead of xrealloc.
authorDevang Patel <dpatel@apple.com>
Tue, 25 May 2004 18:10:41 +0000 (11:10 -0700)
committerDevang Patel <dpatel@gcc.gnu.org>
Tue, 25 May 2004 18:10:41 +0000 (11:10 -0700)
       * alias.c (init_alias_analysis): Use ggc_calloc instead of
       xrealloc.
       (end_alias_analysis): Use ggc_free instead fo free.

From-SVN: r82251

gcc/ChangeLog
gcc/alias.c

index 5819e6c34c4aea6348fac022773ef50565643bdb..2de0da592774fcc4d350b79dbd97b57ce9d693ae 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-25  Devang Patel  <dpatel@apple.com>
+
+       * alias.c (init_alias_analysis): Use ggc_calloc instead of
+       xrealloc.
+       (end_alias_analysis): Use ggc_free instead fo free.
+       
 2004-05-25  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR target/15546
index 46d1dca0168c5879b89e079e945293c97c6636f7..18566c564c564a791dfc1d507c1e4832db0fdda8 100644 (file)
@@ -2827,10 +2827,7 @@ init_alias_analysis (void)
   reg_seen = xmalloc (maxreg);
   if (! reload_completed && flag_old_unroll_loops)
     {
-      /* ??? Why are we realloc'ing if we're just going to zero it?  */
-      alias_invariant = xrealloc (alias_invariant,
-                                 maxreg * sizeof (rtx));
-      memset (alias_invariant, 0, maxreg * sizeof (rtx));
+      alias_invariant = ggc_calloc (maxreg, sizeof (rtx));
       alias_invariant_size = maxreg;
     }
 
@@ -3031,7 +3028,7 @@ end_alias_analysis (void)
   reg_known_equiv_p = 0;
   if (alias_invariant)
     {
-      free (alias_invariant);
+      ggc_free (alias_invariant);
       alias_invariant = 0;
       alias_invariant_size = 0;
     }