+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.
{
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
#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 ();
}
#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 */
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
if (exit_fallthru_edge == NULL)
goto epilogue_done;
-#ifdef HAVE_epilogue
if (HAVE_epilogue)
{
start_sequence ();
set_return_jump_label (returnjump);
}
else
-#endif
{
basic_block cur_bb;
}
#endif
-#ifdef HAVE_epilogue
if (epilogue_end)
{
rtx_insn *insn, *next;
reorder_insns (insn, insn, PREV_INSN (epilogue_end));
}
}
-#endif
bitmap_clear (&bb_flags);
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)
}
}
}
-#endif /* HAVE_prologue or HAVE_epilogue */
}
/* Returns the name of function declared by FNDECL. */
}
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. */
declarations for e.g. AIX 4.x. */
#endif
-#ifndef HAVE_epilogue
-#define HAVE_epilogue 0
-#endif
#ifndef HAVE_prologue
#define HAVE_prologue 0
#endif