OSDN Git Service

* gcc.dg/vect/vect.exp: Run tests with -funroll-loops for SPU in case
[pf3gnuchains/gcc-fork.git] / gcc / reorg.c
index 291e1aa..c20c337 100644 (file)
@@ -428,7 +428,7 @@ find_end_label (void)
             epilogue has filled delay-slots; we would have to try and
             move the delay-slot fillers to the delay-slots for the new
             return insn or in front of the new return insn.  */
-         if (current_function_epilogue_delay_list == NULL
+         if (crtl->epilogue_delay_list == NULL
              && HAVE_return)
            {
              /* The return we make may have delay slots too.  */
@@ -512,6 +512,8 @@ emit_delay_sequence (rtx insn, rtx list, int length)
   INSN_DELETED_P (delay_insn) = 0;
   PREV_INSN (delay_insn) = PREV_INSN (seq_insn);
 
+  INSN_LOCATOR (seq_insn) = INSN_LOCATOR (delay_insn);
+
   for (li = list; li; li = XEXP (li, 1), i++)
     {
       rtx tem = XEXP (li, 0);
@@ -790,7 +792,7 @@ optimize_skip (rtx insn)
      In both of these cases, inverting the jump and annulling the delay
      slot give the same effect in fewer insns.  */
   if ((next_trial == next_active_insn (JUMP_LABEL (insn))
-       && ! (next_trial == 0 && current_function_epilogue_delay_list != 0))
+       && ! (next_trial == 0 && crtl->epilogue_delay_list != 0))
       || (next_trial != 0
          && JUMP_P (next_trial)
          && JUMP_LABEL (insn) == JUMP_LABEL (next_trial)
@@ -2408,7 +2410,7 @@ fill_simple_delay_slots (int non_jumps_p)
      The only thing we can do is scan backwards from the end of the
      function.  If we did this in a previous pass, it is incorrect to do it
      again.  */
-  if (current_function_epilogue_delay_list)
+  if (crtl->epilogue_delay_list)
     return;
 
   slots_to_fill = DELAY_SLOTS_FOR_EPILOGUE;
@@ -2468,9 +2470,9 @@ fill_simple_delay_slots (int non_jumps_p)
              /* Here as well we are searching backward, so put the
                 insns we find on the head of the list.  */
 
-             current_function_epilogue_delay_list
+             crtl->epilogue_delay_list
                = gen_rtx_INSN_LIST (VOIDmode, trial,
-                                    current_function_epilogue_delay_list);
+                                    crtl->epilogue_delay_list);
              mark_end_of_function_resources (trial, 1);
              update_block (trial, trial);
              delete_related_insns (trial);
@@ -2738,7 +2740,7 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
                         temporarily increment the use count on any referenced
                         label lest it be deleted by delete_related_insns.  */
                      for (note = REG_NOTES (trial);
-                          note != NULL;
+                          note != NULL_RTX;
                           note = XEXP (note, 1))
                        if (REG_NOTE_KIND (note) == REG_LABEL_OPERAND
                            || REG_NOTE_KIND (note) == REG_LABEL_TARGET)
@@ -2752,12 +2754,12 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
                                          == REG_LABEL_OPERAND);
                          }
                      if (JUMP_P (trial) && JUMP_LABEL (trial))
-                       LABEL_NUSES (XEXP (note, 0))++;
+                       LABEL_NUSES (JUMP_LABEL (trial))++;
 
                      delete_related_insns (trial);
 
                      for (note = REG_NOTES (trial);
-                          note != NULL;
+                          note != NULL_RTX;
                           note = XEXP (note, 1))
                        if (REG_NOTE_KIND (note) == REG_LABEL_OPERAND
                            || REG_NOTE_KIND (note) == REG_LABEL_TARGET)
@@ -2771,7 +2773,7 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
                                          == REG_LABEL_OPERAND);
                          }
                      if (JUMP_P (trial) && JUMP_LABEL (trial))
-                       LABEL_NUSES (XEXP (note, 0))--;
+                       LABEL_NUSES (JUMP_LABEL (trial))--;
                    }
                  else
                    new_thread = next_active_insn (trial);
@@ -3153,7 +3155,7 @@ delete_prior_computation (rtx note, rtx insn)
       /* If we reach a CALL which is not calling a const function
         or the callee pops the arguments, then give up.  */
       if (CALL_P (our_prev)
-         && (! CONST_OR_PURE_CALL_P (our_prev)
+         && (! RTL_CONST_CALL_P (our_prev)
              || GET_CODE (pat) != SET || GET_CODE (SET_SRC (pat)) != CALL))
        break;
 
@@ -3693,7 +3695,7 @@ make_return_insns (rtx first)
      delay slot filler insns.  It is also unknown whether such a
      transformation would actually be profitable.  Note that the existing
      code only cares for branches with (some) filled delay slots.  */
-  if (current_function_epilogue_delay_list != NULL)
+  if (crtl->epilogue_delay_list != NULL)
     return;
 #endif
 
@@ -4034,7 +4036,7 @@ dbr_schedule (rtx first)
   {
     rtx link;
 
-    for (link = current_function_epilogue_delay_list;
+    for (link = crtl->epilogue_delay_list;
          link;
          link = XEXP (link, 1))
       INSN_LOCATOR (XEXP (link, 0)) = 0;
@@ -4064,8 +4066,10 @@ rest_of_handle_delay_slots (void)
   return 0;
 }
 
-struct tree_opt_pass pass_delay_slots =
+struct rtl_opt_pass pass_delay_slots =
 {
+ {
+  RTL_PASS,
   "dbr",                                /* name */
   gate_handle_delay_slots,              /* gate */
   rest_of_handle_delay_slots,           /* execute */
@@ -4078,8 +4082,8 @@ struct tree_opt_pass pass_delay_slots =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_dump_func |
-  TODO_ggc_collect,                     /* todo_flags_finish */
-  'd'                                   /* letter */
+  TODO_ggc_collect                      /* todo_flags_finish */
+ }
 };
 
 /* Machine dependent reorg pass.  */
@@ -4097,8 +4101,10 @@ rest_of_handle_machine_reorg (void)
   return 0;
 }
 
-struct tree_opt_pass pass_machine_reorg =
+struct rtl_opt_pass pass_machine_reorg =
 {
+ {
+  RTL_PASS,
   "mach",                               /* name */
   gate_handle_machine_reorg,            /* gate */
   rest_of_handle_machine_reorg,         /* execute */
@@ -4111,6 +4117,6 @@ struct tree_opt_pass pass_machine_reorg =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_dump_func |
-  TODO_ggc_collect,                     /* todo_flags_finish */
-  'M'                                   /* letter */
+  TODO_ggc_collect                      /* todo_flags_finish */
+ }
 };