diff gcc/config/c6x/c6x.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line diff
--- a/gcc/config/c6x/c6x.c	Fri Oct 27 22:46:09 2017 +0900
+++ b/gcc/config/c6x/c6x.c	Thu Oct 25 07:37:49 2018 +0900
@@ -1,5 +1,5 @@
 /* Target Code for TI C6X
-   Copyright (C) 2010-2017 Free Software Foundation, Inc.
+   Copyright (C) 2010-2018 Free Software Foundation, Inc.
    Contributed by Andrew Jenner <andrew@codesourcery.com>
    Contributed by Bernd Schmidt <bernds@codesourcery.com>
 
@@ -19,6 +19,8 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+#define IN_TARGET_CODE 1
+
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
@@ -4635,7 +4637,6 @@
 c6x_gen_bundles (void)
 {
   basic_block bb;
-  rtx_insn *insn, *next, *last_call;
 
   FOR_EACH_BB_FN (bb, cfun)
     {
@@ -4702,29 +4703,6 @@
 	    break;
 	}
     }
-  /* Bundling, and emitting nops, can separate
-     NOTE_INSN_CALL_ARG_LOCATION from the corresponding calls.  Fix
-     that up here.  */
-  last_call = NULL;
-  for (insn = get_insns (); insn; insn = next)
-    {
-      next = NEXT_INSN (insn);
-      if (CALL_P (insn)
-	  || (INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE
-	      && CALL_P (XVECEXP (PATTERN (insn), 0, 0))))
-	last_call = insn;
-      if (!NOTE_P (insn) || NOTE_KIND (insn) != NOTE_INSN_CALL_ARG_LOCATION)
-	continue;
-      if (NEXT_INSN (last_call) == insn)
-	continue;
-      SET_NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn);
-      SET_PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn);
-      SET_PREV_INSN (insn) = last_call;
-      SET_NEXT_INSN (insn) = NEXT_INSN (last_call);
-      SET_PREV_INSN (NEXT_INSN (insn)) = insn;
-      SET_NEXT_INSN (PREV_INSN (insn)) = insn;
-      last_call = insn;
-    }
 }
 
 /* Emit a NOP instruction for CYCLES cycles after insn AFTER.  Return it.  */
@@ -4857,7 +4835,7 @@
    the SEQUENCEs that represent execute packets.  */
 
 static void
-reorg_split_calls (rtx_insn **call_labels)
+reorg_split_calls (rtx_code_label **call_labels)
 {
   unsigned int reservation_mask = 0;
   rtx_insn *insn = get_insns ();
@@ -5031,7 +5009,7 @@
    scheduling was run earlier.  */
 
 static void
-reorg_emit_nops (rtx_insn **call_labels)
+reorg_emit_nops (rtx_code_label **call_labels)
 {
   bool first;
   rtx last_call;
@@ -5969,7 +5947,7 @@
     }
   sched_no_dce = false;
 
-  rtx_insn **call_labels = XCNEWVEC (rtx_insn *, get_max_uid () + 1);
+  rtx_code_label **call_labels = XCNEWVEC (rtx_code_label *, get_max_uid () + 1);
 
   reorg_split_calls (call_labels);