]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
emit-rtl.c (copy_most_rtx): Remove.
authorKazu Hirata <kazu@cs.umass.edu>
Tue, 9 Nov 2004 17:46:06 +0000 (17:46 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Tue, 9 Nov 2004 17:46:06 +0000 (17:46 +0000)
* emit-rtl.c (copy_most_rtx): Remove.
* rtl.h: Remove the corresponding prototype.

From-SVN: r90356

gcc/ChangeLog
gcc/emit-rtl.c
gcc/rtl.h

index c979014041cd5bbac68e897dadbb780db0835e7a..3333159014bd3e03b165cefc5d6ae7a5b9b0d2b1 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-09  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * emit-rtl.c (copy_most_rtx): Remove.
+       * rtl.h: Remove the corresponding prototype.
+
 2004-11-09  Kazu Hirata  <kazu@cs.umass.edu>
 
        * cfgloop.c (flow_loops_update): Remove.
index ae4c3eb40c26dde2821b20810d8fb7823ebab612..4bab5b3aa5beaea0af2241f1a45ae46535ada0bf 100644 (file)
@@ -2371,105 +2371,6 @@ reset_used_decls (tree blk)
     reset_used_decls (t);
 }
 
-/* Similar to `copy_rtx' except that if MAY_SHARE is present, it is
-   placed in the result directly, rather than being copied.  MAY_SHARE is
-   either a MEM of an EXPR_LIST of MEMs.  */
-
-rtx
-copy_most_rtx (rtx orig, rtx may_share)
-{
-  rtx copy;
-  int i, j;
-  RTX_CODE code;
-  const char *format_ptr;
-
-  if (orig == may_share
-      || (GET_CODE (may_share) == EXPR_LIST
-         && in_expr_list_p (may_share, orig)))
-    return orig;
-
-  code = GET_CODE (orig);
-
-  switch (code)
-    {
-    case REG:
-    case CONST_INT:
-    case CONST_DOUBLE:
-    case CONST_VECTOR:
-    case SYMBOL_REF:
-    case CODE_LABEL:
-    case PC:
-    case CC0:
-      return orig;
-    default:
-      break;
-    }
-
-  copy = rtx_alloc (code);
-  PUT_MODE (copy, GET_MODE (orig));
-  RTX_FLAG (copy, in_struct) = RTX_FLAG (orig, in_struct);
-  RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
-  RTX_FLAG (copy, unchanging) = RTX_FLAG (orig, unchanging);
-  RTX_FLAG (copy, frame_related) = RTX_FLAG (orig, frame_related);
-  RTX_FLAG (copy, return_val) = RTX_FLAG (orig, return_val);
-
-  format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
-
-  for (i = 0; i < GET_RTX_LENGTH (GET_CODE (copy)); i++)
-    {
-      switch (*format_ptr++)
-       {
-       case 'e':
-         XEXP (copy, i) = XEXP (orig, i);
-         if (XEXP (orig, i) != NULL && XEXP (orig, i) != may_share)
-           XEXP (copy, i) = copy_most_rtx (XEXP (orig, i), may_share);
-         break;
-
-       case 'u':
-         XEXP (copy, i) = XEXP (orig, i);
-         break;
-
-       case 'E':
-       case 'V':
-         XVEC (copy, i) = XVEC (orig, i);
-         if (XVEC (orig, i) != NULL)
-           {
-             XVEC (copy, i) = rtvec_alloc (XVECLEN (orig, i));
-             for (j = 0; j < XVECLEN (copy, i); j++)
-               XVECEXP (copy, i, j)
-                 = copy_most_rtx (XVECEXP (orig, i, j), may_share);
-           }
-         break;
-
-       case 'w':
-         XWINT (copy, i) = XWINT (orig, i);
-         break;
-
-       case 'n':
-       case 'i':
-         XINT (copy, i) = XINT (orig, i);
-         break;
-
-       case 't':
-         XTREE (copy, i) = XTREE (orig, i);
-         break;
-
-       case 's':
-       case 'S':
-         XSTR (copy, i) = XSTR (orig, i);
-         break;
-
-       case '0':
-         X0ANY (copy, i) = X0ANY (orig, i);
-         break;
-
-       default:
-         gcc_unreachable ();
-       }
-    }
-  return copy;
-}
-
 /* Mark ORIG as in use, and return a copy of it if it was already in use.
    Recursively does the same for subexpressions.  Uses
    copy_rtx_if_shared_1 to reduce stack space.  */
index 766cebebd608186ec575ba9bfc2a280499612840..d85c4bd86391ec08108aac08d52eb434b678a3ec 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1387,7 +1387,6 @@ extern void dump_rtx_statistics (void);
 extern rtx copy_rtx_if_shared (rtx);
 
 /* In rtl.c */
-extern rtx copy_most_rtx (rtx, rtx);
 extern rtx shallow_copy_rtx_stat (rtx MEM_STAT_DECL);
 #define shallow_copy_rtx(a) shallow_copy_rtx_stat (a MEM_STAT_INFO)
 extern int rtx_equal_p (rtx, rtx);