summaryrefslogtreecommitdiffstats
path: root/gcc/function.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-07 18:39:03 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-07 18:39:03 +0000
commita590d94de31dd187a8cd3bf13d8501851e2b4ed9 (patch)
treee0871efb05a849856904c49079c83d4b4ca60f1c /gcc/function.c
parent459e9193ab2f7d9b7b34dffc1bb1db09773c7028 (diff)
downloadppe42-gcc-a590d94de31dd187a8cd3bf13d8501851e2b4ed9.tar.gz
ppe42-gcc-a590d94de31dd187a8cd3bf13d8501851e2b4ed9.zip
* function.c (init_function_start): Clear prologue & epilogue.
(prologue_epilogue_contains): New function. * alias.c (init_alias_analysis): Use it. * rtl.h (prologue_epilogue_contains): Declare it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28585 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 3467de0c708..e25d676e579 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -376,6 +376,10 @@ struct function *current_function = 0;
/* Global list of all compiled functions. */
struct function *all_functions = 0;
+
+/* These arrays record the INSN_UIDs of the prologue and epilogue insns. */
+static int *prologue;
+static int *epilogue;
/* In order to evaluate some expressions, such as function calls returning
structures in memory, we need to temporarily allocate stack locations.
@@ -6050,6 +6054,9 @@ init_function_start (subr, filename, line)
current_function_returns_pointer
= POINTER_TYPE_P (TREE_TYPE (DECL_RESULT (subr)));
+
+ /* No prologue/epilogue insns yet. */
+ prologue = epilogue = 0;
}
/* Indicate that the current function uses extra args
@@ -6656,11 +6663,6 @@ expand_function_end (filename, line, end_bindings)
expand_fixups (get_insns ());
}
-/* These arrays record the INSN_UIDs of the prologue and epilogue insns. */
-
-static int *prologue;
-static int *epilogue;
-
/* Create an array that records the INSN_UIDs of INSNS (either a sequence
or a single insn). */
@@ -6715,6 +6717,17 @@ contains (insn, vec)
}
return 0;
}
+
+int
+prologue_epilogue_contains (insn)
+ rtx insn;
+{
+ if (prologue && contains (insn, prologue))
+ return 1;
+ if (epilogue && contains (insn, epilogue))
+ return 1;
+ return 0;
+}
#endif /* HAVE_prologue || HAVE_epilogue */
/* Generate the prologue and epilogue RTL if the machine supports it. Thread
@@ -6727,7 +6740,6 @@ thread_prologue_and_epilogue_insns (f)
{
int insertted = 0;
- prologue = 0;
#ifdef HAVE_prologue
if (HAVE_prologue)
{
@@ -6762,7 +6774,6 @@ thread_prologue_and_epilogue_insns (f)
}
#endif
- epilogue = 0;
#ifdef HAVE_epilogue
if (HAVE_epilogue)
{
OpenPOWER on IntegriCloud