OSDN Git Service

* emit-rtl.c (mark_used_flags): New function.
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 31 Oct 2010 01:58:12 +0000 (01:58 +0000)
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 31 Oct 2010 01:58:12 +0000 (01:58 +0000)
(set_used_flags, reset_used_flags): Call it.

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

gcc/ChangeLog
gcc/emit-rtl.c

index 7c8a08f..2d63609 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-30  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * emit-rtl.c (mark_used_flags): New function.
+       (set_used_flags, reset_used_flags): Call it.
+
 2010-10-30  Uros Bizjak  <ubizjak@gmail.com>
 
        PR middle-end/44569
 
 2010-10-28  Nathan Froyd  <froydnj@codesourcery.com>
 
+       * config/microblaze/microblaze-protos.h (function_arg): Delete.
+       (function_arg_advance): Delete.
+       * config/microblaze/microblaze.h (FUNCTION_ARG_ADVANCE): Delete.
+       (FUNCTION_ARG): Delete.
+       * config/microblaze/microblaze.c (function_arg_advance): Rename to...
+       (microblaze_function_arg_advance): ...this.  Make static.  Take a
+       const_tree and a bool.
+       (function-arg): Rename to...
+       (microblaze_function_arg): ...this.  Make static.  Take a const_tree
+       and a bool.
+       (microblaze_expand_prologue): Call targetm.calls.function_arg and
+       targetm.calls.function_arg_advance.
+       (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
+2010-10-28  Nathan Froyd  <froydnj@codesourcery.com>
+
        * score.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
 
 2010-10-28  Nathan Froyd  <froydnj@codesourcery.com>
index 19d290c..eb4ea2a 100644 (file)
@@ -2728,11 +2728,10 @@ repeat:
   return;
 }
 
-/* Clear all the USED bits in X to allow copy_rtx_if_shared to be used
-   to look for shared sub-parts.  */
+/* Set the USED bit in X and its non-shareable subparts to FLAG.  */
 
-void
-reset_used_flags (rtx x)
+static void
+mark_used_flags (rtx x, int flag)
 {
   int i, j;
   enum rtx_code code;
@@ -2778,7 +2777,7 @@ repeat:
       break;
     }
 
-  RTX_FLAG (x, used) = 0;
+  RTX_FLAG (x, used) = flag;
 
   format_ptr = GET_RTX_FORMAT (code);
   length = GET_RTX_LENGTH (code);
@@ -2793,81 +2792,33 @@ repeat:
               x = XEXP (x, i);
              goto repeat;
             }
-         reset_used_flags (XEXP (x, i));
+         mark_used_flags (XEXP (x, i), flag);
          break;
 
        case 'E':
          for (j = 0; j < XVECLEN (x, i); j++)
-           reset_used_flags (XVECEXP (x, i, j));
+           mark_used_flags (XVECEXP (x, i, j), flag);
          break;
        }
     }
 }
 
-/* Set all the USED bits in X to allow copy_rtx_if_shared to be used
+/* Clear all the USED bits in X to allow copy_rtx_if_shared to be used
    to look for shared sub-parts.  */
 
 void
-set_used_flags (rtx x)
+reset_used_flags (rtx x)
 {
-  int i, j;
-  enum rtx_code code;
-  const char *format_ptr;
-
-  if (x == 0)
-    return;
-
-  code = GET_CODE (x);
-
-  /* These types may be freely shared so we needn't do any resetting
-     for them.  */
-
-  switch (code)
-    {
-    case REG:
-    case DEBUG_EXPR:
-    case VALUE:
-    case CONST_INT:
-    case CONST_DOUBLE:
-    case CONST_FIXED:
-    case CONST_VECTOR:
-    case SYMBOL_REF:
-    case CODE_LABEL:
-    case PC:
-    case CC0:
-      return;
-
-    case DEBUG_INSN:
-    case INSN:
-    case JUMP_INSN:
-    case CALL_INSN:
-    case NOTE:
-    case LABEL_REF:
-    case BARRIER:
-      /* The chain of insns is not being copied.  */
-      return;
-
-    default:
-      break;
-    }
-
-  RTX_FLAG (x, used) = 1;
+  mark_used_flags (x, 0);
+}
 
-  format_ptr = GET_RTX_FORMAT (code);
-  for (i = 0; i < GET_RTX_LENGTH (code); i++)
-    {
-      switch (*format_ptr++)
-       {
-       case 'e':
-         set_used_flags (XEXP (x, i));
-         break;
+/* Set all the USED bits in X to allow copy_rtx_if_shared to be used
+   to look for shared sub-parts.  */
 
-       case 'E':
-         for (j = 0; j < XVECLEN (x, i); j++)
-           set_used_flags (XVECEXP (x, i, j));
-         break;
-       }
-    }
+void
+set_used_flags (rtx x)
+{
+  mark_used_flags (x, 1);
 }
 \f
 /* Copy X if necessary so that it won't be altered by changes in OTHER.