public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: tbsaunde+gcc@tbsaunde.org
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 6/8] always define HAVE_epilogue
Date: Mon, 27 Apr 2015 05:57:00 -0000	[thread overview]
Message-ID: <1430114140-15817-7-git-send-email-tbsaunde+gcc@tbsaunde.org> (raw)
In-Reply-To: <1430114140-15817-1-git-send-email-tbsaunde+gcc@tbsaunde.org>

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

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

	* defaults.h (gen_epilogue): New function.
(HAVE_epilogue): Add default definition to false.
	* alias.c (init_alias_analysis): don't check if HAVE_epilogue is
	defined.
	* cfgrtl.c (cfg_layout_finalize): Likewise.
	* df-scan.c: Likewise.
	* function.c (thread_prologue_and_epilogue_insns): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* reorg.c (find_end_label): Likewise.
	* toplev.c: Likewise.
---
 gcc/alias.c    | 10 +++++++---
 gcc/cfgrtl.c   |  6 +-----
 gcc/defaults.h | 10 ++++++++++
 gcc/df-scan.c  |  3 ---
 gcc/function.c | 12 +++++-------
 gcc/reorg.c    |  2 --
 gcc/toplev.c   |  3 ---
 7 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/gcc/alias.c b/gcc/alias.c
index 8f48660..7d9a3d9 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2925,15 +2925,19 @@ init_alias_analysis (void)
 		{
 		  rtx note, set;
 
-#if defined (HAVE_prologue) || defined (HAVE_epilogue)
+#if defined (HAVE_prologue)
+		  static const bool prologue = true;
+#else
+		  static const bool prologue = false;
+#endif
+
 		  /* The prologue/epilogue insns are not threaded onto the
 		     insn chain until after reload has completed.  Thus,
 		     there is no sense wasting time checking if INSN is in
 		     the prologue/epilogue until after reload has completed.  */
-		  if (reload_completed
+		  if ((prologue || HAVE_epilogue) && reload_completed
 		      && prologue_epilogue_contains (insn))
 		    continue;
-#endif
 
 		  /* If this insn has a noalias note, process it,  Otherwise,
 		     scan for sets.  A simple set will have no side effects
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 7027502..8a75044 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -4339,11 +4339,7 @@ cfg_layout_finalize (void)
 #endif
   force_one_exit_fallthru ();
   rtl_register_cfg_hooks ();
-  if (reload_completed
-#ifdef HAVE_epilogue
-      && !HAVE_epilogue
-#endif
-      )
+  if (reload_completed && !HAVE_epilogue)
     fixup_fallthru_exit_predecessor ();
   fixup_reorder_chain ();
 
diff --git a/gcc/defaults.h b/gcc/defaults.h
index d3da328..4c87191 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1418,6 +1418,16 @@ gen_return ()
 }
 #endif
 
+#ifndef HAVE_epilogue
+#define HAVE_epilogue 0
+static inline rtx
+gen_epilogue ()
+{
+  gcc_unreachable ();
+  return NULL;
+}
+#endif
+
 #endif /* GCC_INSN_FLAGS_H  */
 
 #endif  /* ! GCC_DEFAULTS_H */
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 9f0e47f..a990a7b 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -62,9 +62,6 @@ along with GCC; see the file COPYING3.  If not see
 typedef struct df_mw_hardreg *df_mw_hardreg_ptr;
 
 
-#ifndef HAVE_epilogue
-#define HAVE_epilogue 0
-#endif
 #ifndef HAVE_prologue
 #define HAVE_prologue 0
 #endif
diff --git a/gcc/function.c b/gcc/function.c
index 561a1c5..14afc53 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6066,7 +6066,6 @@ thread_prologue_and_epilogue_insns (void)
   if (exit_fallthru_edge == NULL)
     goto epilogue_done;
 
-#ifdef HAVE_epilogue
   if (HAVE_epilogue)
     {
       start_sequence ();
@@ -6090,7 +6089,6 @@ thread_prologue_and_epilogue_insns (void)
 	set_return_jump_label (returnjump);
     }
   else
-#endif
     {
       basic_block cur_bb;
 
@@ -6183,7 +6181,6 @@ epilogue_done:
     }
 #endif
 
-#ifdef HAVE_epilogue
   if (epilogue_end)
     {
       rtx_insn *insn, *next;
@@ -6201,7 +6198,6 @@ epilogue_done:
 	    reorder_insns (insn, insn, PREV_INSN (epilogue_end));
 	}
     }
-#endif
 
   bitmap_clear (&bb_flags);
 
@@ -6217,8 +6213,11 @@ epilogue_done:
 void
 reposition_prologue_and_epilogue_notes (void)
 {
-#if defined (HAVE_prologue) || defined (HAVE_epilogue) \
-    || defined (HAVE_sibcall_epilogue)
+#if ! defined (HAVE_prologue) && ! defined (HAVE_sibcall_epilogue)
+  if (!HAVE_epilogue)
+    return;
+#endif
+
   /* Since the hash table is created on demand, the fact that it is
      non-null is a signal that it is non-empty.  */
   if (prologue_insn_hash != NULL)
@@ -6315,7 +6314,6 @@ reposition_prologue_and_epilogue_notes (void)
 	    }
 	}
     }
-#endif /* HAVE_prologue or HAVE_epilogue */
 }
 
 /* Returns the name of function declared by FNDECL.  */
diff --git a/gcc/reorg.c b/gcc/reorg.c
index a44d4a3..e9af7b7 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -484,14 +484,12 @@ find_end_label (rtx kind)
 	}
       else
 	{
-#ifdef HAVE_epilogue
 	  if (HAVE_epilogue && ! HAVE_return)
 	    /* The RETURN insn has its delay slot filled so we cannot
 	       emit the label just before it.  Since we already have
 	       an epilogue and cannot emit a new RETURN, we cannot
 	       emit the label at all.  */
 	    return NULL;
-#endif /* HAVE_epilogue */
 
 	  /* Otherwise, make a new label and emit a RETURN and BARRIER,
 	     if needed.  */
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b06eed3..38de36b 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -128,9 +128,6 @@ along with GCC; see the file COPYING3.  If not see
 				   declarations for e.g. AIX 4.x.  */
 #endif
 
-#ifndef HAVE_epilogue
-#define HAVE_epilogue 0
-#endif
 #ifndef HAVE_prologue
 #define HAVE_prologue 0
 #endif
-- 
2.3.0.80.g18d0fec.dirty

  parent reply	other threads:[~2015-04-27  5:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  5:56 [PATCH 0/8] remove more conditional compilation tbsaunde+gcc
2015-04-27  5:56 ` [PATCH 3/8] add default for PCC_BITFIELD_TYPE_MATTERS tbsaunde+gcc
2015-04-29 13:18   ` Andreas Schwab
2015-04-29 21:54     ` Trevor Saunders
2015-04-29 22:00       ` Andreas Schwab
2015-04-29 22:26         ` Jeff Law
2015-04-29 22:30           ` Trevor Saunders
2015-04-29 22:33             ` Jeff Law
2015-04-30  1:45               ` Trevor Saunders
2015-04-30  3:24                 ` Trevor Saunders
2015-04-30  4:13                   ` Jeff Law
2015-04-30  7:13                   ` Andreas Schwab
2015-04-30 11:59                     ` Trevor Saunders
2015-04-30 12:17                       ` Jakub Jelinek
2015-04-30 12:22                       ` Andreas Schwab
2015-04-29 22:40             ` Jeff Law
2015-04-30  6:58             ` Andreas Schwab
2015-04-30 12:34               ` Trevor Saunders
2015-04-30 12:39                 ` Jakub Jelinek
2015-04-30 13:07                   ` Trevor Saunders
2015-04-30 17:50                   ` Joseph Myers
2015-05-01  0:01                     ` Trevor Saunders
2015-04-27  5:56 ` [PATCH 1/8] add default for NO_FUNCTION_CSE tbsaunde+gcc
2015-04-27  5:57 ` [PATCH 2/8] add default for HARD_REGNO_RENAME_OK tbsaunde+gcc
2015-04-27  5:57 ` tbsaunde+gcc [this message]
2015-04-27  5:57 ` [PATCH 7/8] always define ARGS_GROW_DOWNWARD tbsaunde+gcc
2015-04-27  5:57 ` [PATCH 5/8] always define HAVE_simple_return and HAVE_return tbsaunde+gcc
2015-05-06  1:13   ` Mike Stump
2015-05-06  3:16     ` Trevor Saunders
2015-04-27  5:57 ` [PATCH 8/8] remove #if ARGS_GROW_DOWNWARD tbsaunde+gcc
2015-04-27  5:57 ` [PATCH 4/8] add default for EPILOGUE_USES tbsaunde+gcc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430114140-15817-7-git-send-email-tbsaunde+gcc@tbsaunde.org \
    --to=tbsaunde+gcc@tbsaunde.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).