OSDN Git Service

* rtl.c (rtx_alloc): Use memset instead of inline loop.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Jan 1999 01:31:09 +0000 (01:31 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Jan 1999 01:31:09 +0000 (01:31 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24632 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/rtl.c

index 9eb38ff..650fb46 100644 (file)
@@ -1,3 +1,7 @@
+Tue Jan 12 01:30:19 1999  Richard Henderson  <rth@cygnus.com>
+
+       * rtl.c (rtx_alloc): Use memset instead of inline loop.
+
 Tue Jan 12 00:23:31 1999  Richard Henderson  <rth@cygnus.com>
 
        * function.c (purge_addressof_1): If the note accesses a mem+addressof
index 322bdc9..33cf0cb 100644 (file)
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -254,9 +254,7 @@ rtx_alloc (code)
      one int, but we don't want to assume that and it isn't very portable
      anyway; this is.  */
 
-  length = (sizeof (struct rtx_def) - sizeof (rtunion) - 1) / sizeof (int);
-  for (; length >= 0; length--)
-    ((int *) rt)[length] = 0;
+  memset (rt, 0, sizeof (struct rtx_def) - sizeof (rtunion));
 
   PUT_CODE (rt, code);