[11/12] provide default for INSN_SETS_ARE_DELAYED
diff mbox

Message ID 1429622658-9034-12-git-send-email-tbsaunde+gcc@tbsaunde.org
State New
Headers show

Commit Message

tbsaunde+gcc@tbsaunde.org April 21, 2015, 1:24 p.m. UTC
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-04-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h (INSN_SETS_ARE_DELAYED): New definition.
	* reorg.c (redundant_insn): Remove ifdef INSN_SETS_ARE_DELAYED.
	* resource.c (mark_set_resources): Likewise.
---
 gcc/defaults.h | 4 ++++
 gcc/reorg.c    | 4 ----
 gcc/resource.c | 2 --
 3 files changed, 4 insertions(+), 6 deletions(-)

Comments

Jeff Law April 21, 2015, 1:31 p.m. UTC | #1
On 04/21/2015 07:24 AM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> gcc/ChangeLog:
>
> 2015-04-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
>
> 	* defaults.h (INSN_SETS_ARE_DELAYED): New definition.
> 	* reorg.c (redundant_insn): Remove ifdef INSN_SETS_ARE_DELAYED.
> 	* resource.c (mark_set_resources): Likewise.
OK.
Jeff

Patch
diff mbox

diff --git a/gcc/defaults.h b/gcc/defaults.h
index 843d7e2..79cb599 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1201,6 +1201,10 @@  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DEFAULT_PCC_STRUCT_RETURN 1
 #endif
 
+#ifndef INSN_SETS_ARE_DELAYED
+#define INSN_SETS_ARE_DELAYED(INSN) false
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
diff --git a/gcc/reorg.c b/gcc/reorg.c
index b7228f2..ae77f0a 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -1555,10 +1555,8 @@  redundant_insn (rtx insn, rtx_insn *target, rtx delay_list)
 	     slots because it is difficult to track its resource needs
 	     correctly.  */
 
-#ifdef INSN_SETS_ARE_DELAYED
 	  if (INSN_SETS_ARE_DELAYED (seq->insn (0)))
 	    return 0;
-#endif
 
 #ifdef INSN_REFERENCES_ARE_DELAYED
 	  if (INSN_REFERENCES_ARE_DELAYED (seq->insn (0)))
@@ -1657,10 +1655,8 @@  redundant_insn (rtx insn, rtx_insn *target, rtx delay_list)
 	  /* If this is an INSN or JUMP_INSN with delayed effects, it
 	     is hard to track the resource needs properly, so give up.  */
 
-#ifdef INSN_SETS_ARE_DELAYED
 	  if (INSN_SETS_ARE_DELAYED (control))
 	    return 0;
-#endif
 
 #ifdef INSN_REFERENCES_ARE_DELAYED
 	  if (INSN_REFERENCES_ARE_DELAYED (control))
diff --git a/gcc/resource.c b/gcc/resource.c
index 9a013b3..5af9376 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -696,11 +696,9 @@  mark_set_resources (rtx x, struct resources *res, int in_dest,
 	/* An insn consisting of just a CLOBBER (or USE) is just for flow
 	   and doesn't actually do anything, so we ignore it.  */
 
-#ifdef INSN_SETS_ARE_DELAYED
       if (mark_type != MARK_SRC_DEST_CALL
 	  && INSN_SETS_ARE_DELAYED (as_a <rtx_insn *> (x)))
 	return;
-#endif
 
       x = PATTERN (x);
       if (GET_CODE (x) != USE && GET_CODE (x) != CLOBBER)