OSDN Git Service

* calls.c (purge_reg_equiv_notes): Remove, fold into...
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 May 2005 17:52:20 +0000 (17:52 +0000)
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 May 2005 17:52:20 +0000 (17:52 +0000)
(fixup_tail_calls): ...here.  Only look at insns between the
start of the function and the FUNCTION_BEG insn note.

* gcse.c (one_cprop_pass): Fix typos in dumps.

* tree-ssa-operands.h (FOR_EACH_PHI_ARG): Fix typos.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99461 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/calls.c
gcc/gcse.c
gcc/tree-ssa-operands.h

index ddc10d7..49abfdd 100644 (file)
@@ -1,3 +1,13 @@
+2005-05-09  Steven Bosscher  <stevenb@suse.de>
+
+       * calls.c (purge_reg_equiv_notes): Remove, fold into...
+       (fixup_tail_calls): ...here.  Only look at insns between the
+       start of the function and the FUNCTION_BEG insn note.
+
+       * gcse.c (one_cprop_pass): Fix typos in dumps.
+
+       * tree-ssa-operands.h (FOR_EACH_PHI_ARG): Fix typos.
+
 2005-05-09  Adrian Straetling  <straetling@de.ibm.com>
 
        * config/s390/s390.h: Move xxx_REGNUM definitions to s390.md.
 2005-05-09  Adrian Straetling  <straetling@de.ibm.com>
 
        * config/s390/s390.h: Move xxx_REGNUM definitions to s390.md.
index b26e873..3c4cbf8 100644 (file)
@@ -1766,30 +1766,6 @@ shift_return_value (enum machine_mode mode, bool left_p, rtx value)
   return true;
 }
 
   return true;
 }
 
-/* Remove all REG_EQUIV notes found in the insn chain.  */
-
-static void
-purge_reg_equiv_notes (void)
-{
-  rtx insn;
-
-  for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
-    {
-      while (1)
-       {
-         rtx note = find_reg_note (insn, REG_EQUIV, 0);
-         if (note)
-           {
-             /* Remove the note and keep looking at the notes for
-                this insn.  */
-             remove_note (insn, note);
-             continue;
-           }
-         break;
-       }
-    }
-}
-
 /* Generate all the code for a function call
    and return an rtx for its value.
    Store the value in TARGET (specified as an rtx) if convenient.
 /* Generate all the code for a function call
    and return an rtx for its value.
    Store the value in TARGET (specified as an rtx) if convenient.
@@ -3050,16 +3026,40 @@ expand_call (tree exp, rtx target, int ignore)
    this function's incoming arguments.
 
    At the start of RTL generation we know the only REG_EQUIV notes
    this function's incoming arguments.
 
    At the start of RTL generation we know the only REG_EQUIV notes
-   in the rtl chain are those for incoming arguments, so we can safely
-   flush any REG_EQUIV note.
+   in the rtl chain are those for incoming arguments, so we can look
+   for REG_EQUIV notes between the start of the function and the
+   NOTE_INSN_FUNCTION_BEG.
 
    This is (slight) overkill.  We could keep track of the highest
    argument we clobber and be more selective in removing notes, but it
    does not seem to be worth the effort.  */
 
    This is (slight) overkill.  We could keep track of the highest
    argument we clobber and be more selective in removing notes, but it
    does not seem to be worth the effort.  */
+
 void
 fixup_tail_calls (void)
 {
 void
 fixup_tail_calls (void)
 {
-  purge_reg_equiv_notes ();
+  rtx insn;
+
+  for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+    {
+      /* There are never REG_EQUIV notes for the incoming arguments
+        after the NOTE_INSN_FUNCTION_BEG note, so stop if we see it.  */
+      if (NOTE_P (insn)
+         && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
+       break;
+
+      while (1)
+       {
+         rtx note = find_reg_note (insn, REG_EQUIV, 0);
+         if (note)
+           {
+             /* Remove the note and keep looking at the notes for
+                this insn.  */
+             remove_note (insn, note);
+             continue;
+           }
+         break;
+       }
+    }
 }
 
 /* Traverse an argument list in VALUES and expand all complex
 }
 
 /* Traverse an argument list in VALUES and expand all complex
index 10460a8..3cd1268 100644 (file)
@@ -3415,7 +3415,7 @@ one_cprop_pass (int pass, bool cprop_jumps, bool bypass_jumps)
     {
       fprintf (gcse_file, "CPROP of %s, pass %d: %d bytes needed, ",
               current_function_name (), pass, bytes_used);
     {
       fprintf (gcse_file, "CPROP of %s, pass %d: %d bytes needed, ",
               current_function_name (), pass, bytes_used);
-      fprintf (gcse_file, "%d local const props, %d local copy props\n\n",
+      fprintf (gcse_file, "%d local const props, %d local copy props",
               local_const_prop_count, local_copy_prop_count);
       fprintf (gcse_file, "%d global const props, %d global copy props\n\n",
               global_const_prop_count, global_copy_prop_count);
               local_const_prop_count, local_copy_prop_count);
       fprintf (gcse_file, "%d global const props, %d global copy props\n\n",
               global_const_prop_count, global_copy_prop_count);
index 12f75ce..323ac3f 100644 (file)
@@ -270,7 +270,7 @@ typedef struct ssa_operand_iterator_d
 /* This macro will execute a loop over all the arguments of a PHI which
    match FLAGS.   A use_operand_p is always returned via USEVAR.  FLAGS
    can be either SSA_OP_USE or SSA_OP_VIRTUAL_USES or SSA_OP_ALL_USES.  */
 /* This macro will execute a loop over all the arguments of a PHI which
    match FLAGS.   A use_operand_p is always returned via USEVAR.  FLAGS
    can be either SSA_OP_USE or SSA_OP_VIRTUAL_USES or SSA_OP_ALL_USES.  */
-#define FOR_EACH_PHI_ARG (USEVAR, STMT, ITER, FLAGS)           \
+#define FOR_EACH_PHI_ARG(USEVAR, STMT, ITER, FLAGS)            \
   for ((USEVAR) = op_iter_init_phiuse (&(ITER), STMT, FLAGS);  \
        !op_iter_done (&(ITER));                                        \
        (USEVAR) = op_iter_next_use (&(ITER)))
   for ((USEVAR) = op_iter_init_phiuse (&(ITER), STMT, FLAGS);  \
        !op_iter_done (&(ITER));                                        \
        (USEVAR) = op_iter_next_use (&(ITER)))
@@ -311,7 +311,8 @@ typedef struct ssa_operand_iterator_d
    FLAGS, then NULL_DEF_OPERAND_P is returned.  */
 #define SINGLE_SSA_DEF_OPERAND(STMT, FLAGS)                    \
   single_ssa_def_operand (STMT, FLAGS)
    FLAGS, then NULL_DEF_OPERAND_P is returned.  */
 #define SINGLE_SSA_DEF_OPERAND(STMT, FLAGS)                    \
   single_ssa_def_operand (STMT, FLAGS)
-                                                                               /* This macro returns TRUE if there are no operands matching FLAGS in STMT.  */
+
+/* This macro returns TRUE if there are no operands matching FLAGS in STMT.  */
 #define ZERO_SSA_OPERANDS(STMT, FLAGS)         zero_ssa_operands (STMT, FLAGS)
 
 /* This macro counts the number of operands in STMT matching FLAGS.  */
 #define ZERO_SSA_OPERANDS(STMT, FLAGS)         zero_ssa_operands (STMT, FLAGS)
 
 /* This macro counts the number of operands in STMT matching FLAGS.  */