AIX regression due to DFA scheduler merge

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Thu Jun 6 13:40:00 GMT 2002


On Tuesday 04 June 2002 23:24, Franz Sirl wrote:
> On Tuesday 04 June 2002 21:55, Janis Johnson wrote:
> > On Tue, Jun 04, 2002 at 07:51:43PM +0200, Franz Sirl wrote:
> > > OK to commit?
> > >
> > > Franz.
> > >
> > > 	* rtl.h (SCHED_GROUP_P): Disallow CODE_LABEL, BARRIER and NOTE.
> > > 	* haifa-sched.c (move_insn): Adjust for the SCHED_GROUP_P change.
> > > 	(set_priorities): Likewise.
> > > 	* sched-deps.c (add_dependence): Likewise:
> > > 	(group_leader): Likewise.
> > > 	* sched-ebb.c (init_ready_list): Likewise.
> > > 	* sched-rgn.c (init_ready_list): Likewise.
> >
> > The RTL flags are documented in rtl.texi, so please update the entries
> > for the modified macro there as well (once for the macro and once for
> > the flag).
>
> Like that? I fixed the /i -> /s typo on the way.
>
> Franz.
>
>
> 	* rtl.h (SCHED_GROUP_P): Disallow CODE_LABEL, BARRIER and NOTE.
> 	* haifa-sched.c (move_insn): Adjust for the SCHED_GROUP_P change.
> 	(set_priorities): Likewise.
> 	* sched-deps.c (add_dependence): Likewise:
> 	(group_leader): Likewise.
> 	* sched-ebb.c (init_ready_list): Likewise.
> 	* sched-rgn.c (init_ready_list): Likewise.
> 	* doc/rtl.texi: Adjust accordingly.

It turned out the hunks in haifa-sched.c and sched-ebb.c are unnecessary for a 
successful regressionless bootstrap on powerpc-linux-gnu and i686-linux-gnu.

Jeff, OK to commit to mainline?

Franz.

	* rtl.h (SCHED_GROUP_P): Disallow CODE_LABEL, BARRIER and NOTE.
	* sched-deps.c (add_dependence): Likewise.
	(group_leader): Likewise.
	* sched-rgn.c (init_ready_list): Likewise.
	* doc/rtl.texi: Adjust accordingly.
-------------- next part --------------
Index: gcc/rtl.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.355
diff -u -p -r1.355 rtl.h
--- gcc/rtl.h	6 Jun 2002 06:37:34 -0000	1.355
+++ gcc/rtl.h	6 Jun 2002 20:30:48 -0000
@@ -161,9 +161,8 @@ struct rtx_def
      and must not be deleted even if its count is zero.
      1 in a LABEL_REF if this is a reference to a label outside the
      current loop.
-     1 in an INSN, JUMP_INSN, CALL_INSN, CODE_LABEL, BARRIER, or NOTE if
-     this insn must be scheduled together with the preceding insn.  Valid
-     only within sched.
+     1 in an INSN, JUMP_INSN or CALL_INSN if this insn must be scheduled
+     together with the preceding insn.  Valid only within sched.
      1 in an INSN, JUMP_INSN, or CALL_INSN if insn is in a delay slot and
      from the target of a branch.  Valid from reorg until end of compilation;
      cleared before used.
@@ -1118,8 +1117,8 @@ do {						\
 /* During sched, 1 if RTX is an insn that must be scheduled together
    with the preceding insn.  */
 #define SCHED_GROUP_P(RTX)						\
-  (RTL_FLAG_CHECK6("SCHED_GROUP_P", (RTX), INSN, JUMP_INSN, CALL_INSN,	\
-		          CODE_LABEL, BARRIER, NOTE)->in_struct)
+  (RTL_FLAG_CHECK3("SCHED_GROUP_P", (RTX), INSN, JUMP_INSN, CALL_INSN	\
+		          )->in_struct)
 
 /* For a SET rtx, SET_DEST is the place that is set
    and SET_SRC is the value it is set to.  */
Index: gcc/sched-deps.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/sched-deps.c,v
retrieving revision 1.43
diff -u -p -r1.43 sched-deps.c
--- gcc/sched-deps.c	4 Jun 2002 17:46:13 -0000	1.43
+++ gcc/sched-deps.c	6 Jun 2002 20:30:52 -0000
@@ -222,8 +222,7 @@ add_dependence (insn, elem, dep_type)
      setters of the condition codes, so we must skip past notes here.
      Otherwise, NOTEs are impossible here.  */
   next = next_nonnote_insn (elem);
-  if (next && SCHED_GROUP_P (next)
-      && GET_CODE (next) != CODE_LABEL)
+  if (next && INSN_P (next) && SCHED_GROUP_P (next))
     {
       /* Notes will never intervene here though, so don't bother checking
          for them.  */
@@ -235,8 +234,8 @@ add_dependence (insn, elem, dep_type)
 
       rtx nnext;
       while ((nnext = next_nonnote_insn (next)) != NULL
-	     && SCHED_GROUP_P (nnext)
-	     && GET_CODE (nnext) != CODE_LABEL)
+	     && INSN_P (nnext)
+	     && SCHED_GROUP_P (nnext))
 	next = nnext;
 
       /* Again, don't depend an insn on itself.  */
@@ -448,7 +447,7 @@ group_leader (insn)
       prev = insn;
       insn = next_nonnote_insn (insn);
     }
-  while (insn && SCHED_GROUP_P (insn) && (GET_CODE (insn) != CODE_LABEL));
+  while (insn && INSN_P (insn) && SCHED_GROUP_P (insn));
 
   return prev;
 }
Index: gcc/sched-rgn.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/sched-rgn.c,v
retrieving revision 1.44
diff -u -p -r1.44 sched-rgn.c
--- gcc/sched-rgn.c	2 Jun 2002 21:09:47 -0000	1.44
+++ gcc/sched-rgn.c	6 Jun 2002 20:30:56 -0000
@@ -2033,7 +2033,7 @@ init_ready_list (ready)
       next = NEXT_INSN (insn);
 
       if (INSN_DEP_COUNT (insn) == 0
-	  && (SCHED_GROUP_P (next) == 0 || ! INSN_P (next)))
+	  && (! INSN_P (next) || SCHED_GROUP_P (next) == 0))
 	ready_add (ready, insn);
       if (!(SCHED_GROUP_P (insn)))
 	target_n_insns++;
@@ -2079,8 +2079,8 @@ init_ready_list (ready)
 		next = next_nonnote_insn (insn);
 		if (INSN_DEP_COUNT (insn) == 0
 		    && (! next
-			|| SCHED_GROUP_P (next) == 0
-			|| ! INSN_P (next)))
+			|| ! INSN_P (next)
+			|| SCHED_GROUP_P (next) == 0))
 		  ready_add (ready, insn);
 	      }
 	  }
Index: gcc/doc/rtl.texi
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/doc/rtl.texi,v
retrieving revision 1.38
diff -u -p -r1.38 rtl.texi
--- gcc/doc/rtl.texi	30 May 2002 18:28:56 -0000	1.38
+++ gcc/doc/rtl.texi	6 Jun 2002 20:31:00 -0000
@@ -614,17 +614,13 @@ anywhere.  This does not mean that it is
 Stored in the @code{unchanging} field and printed as @samp{/u}.
 
 @findex SCHED_GROUP_P
-@cindex @code{insn} and @samp{/i}
-@cindex @code{call_insn} and @samp{/i}
-@cindex @code{jump_insn} and @samp{/i}
-@cindex @code{code_label} and @samp{/i}
-@cindex @code{barrier} and @samp{/i}
-@cindex @code{note} and @samp{/i}
-@cindex @code{in_struct}, in @code{insn}, @code{jump_insn}, @code{call_insn}, @code{code_label}, @code{barrier}, and @code{note}
+@cindex @code{insn} and @samp{/s}
+@cindex @code{call_insn} and @samp{/s}
+@cindex @code{jump_insn} and @samp{/s}
+@cindex @code{in_struct}, in @code{insn}, @code{jump_insn} and @code{call_insn}
 @item SCHED_GROUP_P (@var{x})
-During instruction scheduling, in an @code{insn}, @code{call_insn},
-@code{jump_insn}, @code{code_label}, @code{barrier}, or
-@code{note}, indicates that the
+During instruction scheduling, in an @code{insn}, @code{call_insn} or
+@code{jump_insn}, indicates that the
 previous insn must be scheduled together with this insn.  This is used to
 ensure that certain groups of instructions will not be split up by the
 instruction scheduling pass, for example, @code{use} insns before


More information about the Gcc-patches mailing list