function.c (init_function_start): Clear prologue & epilogue.
authorRichard Henderson <rth@cygnus.com>
Sat, 7 Aug 1999 18:39:03 +0000 (11:39 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 7 Aug 1999 18:39:03 +0000 (11:39 -0700)
        * 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.

From-SVN: r28585

gcc/ChangeLog
gcc/alias.c
gcc/function.c
gcc/rtl.h

index 2a6b9b6d3a254d1eb889b1b9c0c87d49ef978b1e..a1cc202bbe4215db4cd99dfb1660ba09785d2813 100644 (file)
@@ -1,3 +1,10 @@
+Sat Aug  7 19:37:07 1999  Richard Henderson  <rth@cygnus.com>
+
+       * 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.
+
 Sat Aug  7 19:32:16 1999  Richard Henderson  <rth@cygnus.com>
 
        * jump.c (onlyjump_p): New function.
index 9d8aac7832a481d6becc13c7509f788e2c98c0c4..63c9efd1aaa65f457399cedd85a9f352d537ddfb 100644 (file)
@@ -1468,6 +1468,8 @@ init_alias_analysis ()
       /* Walk the insns adding values to the new_reg_base_value array.  */
       for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
        {
+         if (prologue_epilogue_contains (insn))
+           continue;
          if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
            {
              rtx note, set;
index 3467de0c708bad406d8c1c9070c5f34e55820c36..e25d676e579488e73d14bf540cc6323f83d28f2d 100644 (file)
@@ -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;
 \f
 /* 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 ());
 }
 \f
-/* 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)
     {
index a0bd720e2fbdd3b1cc3143fc2d97c7e399b563ba..c39bd10b1ac4f82f3bcb98f5980294a2e6aa2fa4 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1452,6 +1452,7 @@ extern void record_excess_regs            PROTO ((rtx, rtx, rtx *));
 /* In function.c */
 extern void reposition_prologue_and_epilogue_notes     PROTO ((rtx));
 extern void thread_prologue_and_epilogue_insns         PROTO ((rtx));
+extern int prologue_epilogue_contains                  PROTO ((rtx));
 extern void use_variable                               PROTO ((rtx));
 extern HOST_WIDE_INT get_frame_size                    PROTO ((void));
 extern void preserve_rtl_expr_result                   PROTO ((rtx));