From 7440af146e17a8ba291f11da9a94c1da28380f00 Mon Sep 17 00:00:00 2001
From: "David S. Miller" <davem@redhat.com>
Date: Fri, 10 May 2002 13:13:02 -0700
Subject: [PATCH] rtl.h (INSN_ANNULLED_BRANCH_P): Accept INSN too, update
 comment.

2002-05-10  David S. Miller  <davem@redhat.com>

	* rtl.h (INSN_ANNULLED_BRANCH_P): Accept INSN too, update comment.
	(struct rtx_def): Update unchanging flag comment.
	* doc/rtl.texi (INSN_ANNULLED_BRANCH_P): Update description.
	* reorg.c (delete_from_delay_list): INSN_ANNULLED_BRANCH_P needs
	to be handled to INSN too.
	(dbr_schedule): Likewise.
	* resource.c (next_insn_no_annul): Likewise.

From-SVN: r53370
---
 gcc/ChangeLog    |  8 ++++++++
 gcc/doc/rtl.texi | 10 ++++++----
 gcc/reorg.c      |  6 ++++--
 gcc/resource.c   |  4 +++-
 gcc/rtl.h        |  6 +++---
 5 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aa0ed6f32ca0..a4ef701ba34c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@
 2002-05-10  David S. Miller  <davem@redhat.com>
 
+	* rtl.h (INSN_ANNULLED_BRANCH_P): Accept INSN too, update comment.
+	(struct rtx_def): Update unchanging flag comment.
+	* doc/rtl.texi (INSN_ANNULLED_BRANCH_P): Update description.
+	* reorg.c (delete_from_delay_list): INSN_ANNULLED_BRANCH_P needs
+	to be handled to INSN too.
+	(dbr_schedule): Likewise.
+	* resource.c (next_insn_no_annul): Likewise.
+
 	* cse.c (rtx_cost): Remove multiplication by power of 2 special
 	casing.
 
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 23994fdf2862..bf90a7b5a134 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -397,11 +397,13 @@ Stored in the @code{unchanging} field and printed as @samp{/u}.
 @findex INSN_ANNULLED_BRANCH_P
 @cindex @code{jump_insn} and @samp{/u}
 @cindex @code{call_insn} and @samp{/u}
-@cindex @code{unchanging}, in @code{jump_insn} and @code{call_insn}
+@cindex @code{insn} and @samp{/u}
+@cindex @code{unchanging}, in @code{jump_insn}, @code{call_insn} and @code{insn}
 @item INSN_ANNULLED_BRANCH_P (@var{x})
-In a @code{jump_insn} or @code{call_insn} indicates that the branch is
-an annulling one.  See the discussion under @code{sequence} below.
-Stored in the @code{unchanging} field and printed as @samp{/u}.
+In a @code{jump_insn}, @code{call_insn}, or @code{insn} indicates
+that the branch is an annulling one.  See the discussion under
+@code{sequence} below. Stored in the @code{unchanging} field and
+printed as @samp{/u}.
 
 @findex INSN_DEAD_CODE_P
 @cindex @code{insn} and @samp{/s}
diff --git a/gcc/reorg.c b/gcc/reorg.c
index e6793ed8bbaa..34165ab4e727 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -618,7 +618,8 @@ delete_from_delay_slot (insn)
   if (delay_list)
     trial = emit_delay_sequence (trial, delay_list, XVECLEN (seq, 0) - 2);
   else if (GET_CODE (trial) == JUMP_INSN
-	   || GET_CODE (trial) == CALL_INSN)
+	   || GET_CODE (trial) == CALL_INSN
+	   || GET_CODE (trial) == INSN)
     INSN_ANNULLED_BRANCH_P (trial) = 0;
 
   INSN_FROM_TARGET_P (insn) = 0;
@@ -3630,7 +3631,8 @@ dbr_schedule (first, file)
       rtx target;
 
       if (GET_CODE (insn) == JUMP_INSN
-	  || GET_CODE (insn) == CALL_INSN)
+	  || GET_CODE (insn) == CALL_INSN
+	  || GET_CODE (insn) == INSN)
 	INSN_ANNULLED_BRANCH_P (insn) = 0;
       INSN_FROM_TARGET_P (insn) = 0;
 
diff --git a/gcc/resource.c b/gcc/resource.c
index c6b75705ee3c..6c20517a5f09 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -175,7 +175,9 @@ next_insn_no_annul (insn)
     {
       /* If INSN is an annulled branch, skip any insns from the target
 	 of the branch.  */
-      if (GET_CODE (insn) == JUMP_INSN
+      if ((GET_CODE (insn) == JUMP_INSN
+	   || GET_CODE (insn) == CALL_INSN
+	   || GET_CODE (insn) == INSN)
 	  && INSN_ANNULLED_BRANCH_P (insn)
 	  && NEXT_INSN (PREV_INSN (insn)) != insn)
 	{
diff --git a/gcc/rtl.h b/gcc/rtl.h
index f83ac8200a18..c164f743763d 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -140,7 +140,7 @@ struct rtx_def
      1 in a SYMBOL_REF if it addresses something in the per-function
      constants pool.
      1 in a CALL_INSN, NOTE, or EXPR_LIST for a const or pure call.
-     1 in a JUMP_INSN or CALL_INSN of an annulling branch.  */
+     1 in a JUMP_INSN, CALL_INSN, or INSN of an annulling branch.  */
   unsigned int unchanging : 1;
   /* 1 in a MEM or ASM_OPERANDS expression if the memory reference is volatile.
      1 in an INSN, CALL_INSN, JUMP_INSN, CODE_LABEL, BARRIER, or NOTE
@@ -537,9 +537,9 @@ do {				\
 #define SIBLING_CALL_P(RTX)						\
   (RTL_FLAG_CHECK1("SIBLING_CALL_P", (RTX), CALL_INSN)->jump)
 
-/* 1 if RTX is an insn that is an annulling branch.  */
+/* 1 if RTX is a jump_insn, call_insn, or insn that is an annulling branch.  */
 #define INSN_ANNULLED_BRANCH_P(RTX)					\
-  (RTL_FLAG_CHECK2("INSN_ANNULLED_BRANCH_P", (RTX), JUMP_INSN, CALL_INSN)->unchanging)
+  (RTL_FLAG_CHECK3("INSN_ANNULLED_BRANCH_P", (RTX), JUMP_INSN, CALL_INSN, INSN)->unchanging)
 
 /* 1 if RTX is an insn that is dead code.  Valid only for dead-code
    elimination phase.  */
-- 
GitLab