Commit 5251b8b3 by Trevor Saunders Committed by Trevor Saunders

always define HAVE_epilogue

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.

From-SVN: r222506
parent 08b7ff1e
2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* defaults.h (gen_epilogue): New function.
* 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.
2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* bb-reorder.c (HAVE_return): Don't check if its undefined. * bb-reorder.c (HAVE_return): Don't check if its undefined.
* defaults.h (gen_simple_return): New function. * defaults.h (gen_simple_return): New function.
(gen_simple_return): Likewise. (gen_simple_return): Likewise.
......
...@@ -2925,15 +2925,19 @@ init_alias_analysis (void) ...@@ -2925,15 +2925,19 @@ init_alias_analysis (void)
{ {
rtx note, set; 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 /* The prologue/epilogue insns are not threaded onto the
insn chain until after reload has completed. Thus, insn chain until after reload has completed. Thus,
there is no sense wasting time checking if INSN is in there is no sense wasting time checking if INSN is in
the prologue/epilogue until after reload has completed. */ the prologue/epilogue until after reload has completed. */
if (reload_completed if ((prologue || HAVE_epilogue) && reload_completed
&& prologue_epilogue_contains (insn)) && prologue_epilogue_contains (insn))
continue; continue;
#endif
/* If this insn has a noalias note, process it, Otherwise, /* If this insn has a noalias note, process it, Otherwise,
scan for sets. A simple set will have no side effects scan for sets. A simple set will have no side effects
......
...@@ -4339,11 +4339,7 @@ cfg_layout_finalize (void) ...@@ -4339,11 +4339,7 @@ cfg_layout_finalize (void)
#endif #endif
force_one_exit_fallthru (); force_one_exit_fallthru ();
rtl_register_cfg_hooks (); rtl_register_cfg_hooks ();
if (reload_completed if (reload_completed && !HAVE_epilogue)
#ifdef HAVE_epilogue
&& !HAVE_epilogue
#endif
)
fixup_fallthru_exit_predecessor (); fixup_fallthru_exit_predecessor ();
fixup_reorder_chain (); fixup_reorder_chain ();
......
...@@ -1418,6 +1418,16 @@ gen_return () ...@@ -1418,6 +1418,16 @@ gen_return ()
} }
#endif #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_INSN_FLAGS_H */
#endif /* ! GCC_DEFAULTS_H */ #endif /* ! GCC_DEFAULTS_H */
...@@ -62,9 +62,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -62,9 +62,6 @@ along with GCC; see the file COPYING3. If not see
typedef struct df_mw_hardreg *df_mw_hardreg_ptr; typedef struct df_mw_hardreg *df_mw_hardreg_ptr;
#ifndef HAVE_epilogue
#define HAVE_epilogue 0
#endif
#ifndef HAVE_prologue #ifndef HAVE_prologue
#define HAVE_prologue 0 #define HAVE_prologue 0
#endif #endif
......
...@@ -6066,7 +6066,6 @@ thread_prologue_and_epilogue_insns (void) ...@@ -6066,7 +6066,6 @@ thread_prologue_and_epilogue_insns (void)
if (exit_fallthru_edge == NULL) if (exit_fallthru_edge == NULL)
goto epilogue_done; goto epilogue_done;
#ifdef HAVE_epilogue
if (HAVE_epilogue) if (HAVE_epilogue)
{ {
start_sequence (); start_sequence ();
...@@ -6090,7 +6089,6 @@ thread_prologue_and_epilogue_insns (void) ...@@ -6090,7 +6089,6 @@ thread_prologue_and_epilogue_insns (void)
set_return_jump_label (returnjump); set_return_jump_label (returnjump);
} }
else else
#endif
{ {
basic_block cur_bb; basic_block cur_bb;
...@@ -6183,7 +6181,6 @@ epilogue_done: ...@@ -6183,7 +6181,6 @@ epilogue_done:
} }
#endif #endif
#ifdef HAVE_epilogue
if (epilogue_end) if (epilogue_end)
{ {
rtx_insn *insn, *next; rtx_insn *insn, *next;
...@@ -6201,7 +6198,6 @@ epilogue_done: ...@@ -6201,7 +6198,6 @@ epilogue_done:
reorder_insns (insn, insn, PREV_INSN (epilogue_end)); reorder_insns (insn, insn, PREV_INSN (epilogue_end));
} }
} }
#endif
bitmap_clear (&bb_flags); bitmap_clear (&bb_flags);
...@@ -6217,8 +6213,11 @@ epilogue_done: ...@@ -6217,8 +6213,11 @@ epilogue_done:
void void
reposition_prologue_and_epilogue_notes (void) reposition_prologue_and_epilogue_notes (void)
{ {
#if defined (HAVE_prologue) || defined (HAVE_epilogue) \ #if ! defined (HAVE_prologue) && ! defined (HAVE_sibcall_epilogue)
|| defined (HAVE_sibcall_epilogue) if (!HAVE_epilogue)
return;
#endif
/* Since the hash table is created on demand, the fact that it is /* Since the hash table is created on demand, the fact that it is
non-null is a signal that it is non-empty. */ non-null is a signal that it is non-empty. */
if (prologue_insn_hash != NULL) if (prologue_insn_hash != NULL)
...@@ -6315,7 +6314,6 @@ reposition_prologue_and_epilogue_notes (void) ...@@ -6315,7 +6314,6 @@ reposition_prologue_and_epilogue_notes (void)
} }
} }
} }
#endif /* HAVE_prologue or HAVE_epilogue */
} }
/* Returns the name of function declared by FNDECL. */ /* Returns the name of function declared by FNDECL. */
......
...@@ -484,14 +484,12 @@ find_end_label (rtx kind) ...@@ -484,14 +484,12 @@ find_end_label (rtx kind)
} }
else else
{ {
#ifdef HAVE_epilogue
if (HAVE_epilogue && ! HAVE_return) if (HAVE_epilogue && ! HAVE_return)
/* The RETURN insn has its delay slot filled so we cannot /* The RETURN insn has its delay slot filled so we cannot
emit the label just before it. Since we already have emit the label just before it. Since we already have
an epilogue and cannot emit a new RETURN, we cannot an epilogue and cannot emit a new RETURN, we cannot
emit the label at all. */ emit the label at all. */
return NULL; return NULL;
#endif /* HAVE_epilogue */
/* Otherwise, make a new label and emit a RETURN and BARRIER, /* Otherwise, make a new label and emit a RETURN and BARRIER,
if needed. */ if needed. */
......
...@@ -128,9 +128,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -128,9 +128,6 @@ along with GCC; see the file COPYING3. If not see
declarations for e.g. AIX 4.x. */ declarations for e.g. AIX 4.x. */
#endif #endif
#ifndef HAVE_epilogue
#define HAVE_epilogue 0
#endif
#ifndef HAVE_prologue #ifndef HAVE_prologue
#define HAVE_prologue 0 #define HAVE_prologue 0
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment