]> gcc.gnu.org Git - gcc.git/commitdiff
Correctly count substitutions if eliminations are going on.
authorBernd Schmidt <bernds@redhat.com>
Thu, 17 May 2001 12:38:47 +0000 (12:38 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 17 May 2001 12:38:47 +0000 (12:38 +0000)
From-SVN: r42198

gcc/ChangeLog
gcc/reload1.c

index 72ea1fd02c2c0fbffe322b1d276018dfef7eddc5..15b445d205f6c4b05984ea7da52cff059a2fa89d 100644 (file)
@@ -3,6 +3,9 @@
        * stmt.c (expand_asm_operands): For inout operands, make sure
        the substitution of '=' for '+' makes it into the rtl.
 
+       * reload1.c (delete_output_reload): Call eliminate_regs on substed.
+       (reload_as_needed): Call update_eliminable_offsets a bit later.
+
 2001-05-17  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
 
        * gcc.texi (gccbug): Refer to the web pages for detailed information
index dbf99d62dacba4f00bdcfed899de317c8345ba13..ccf7619df845b73ef29ad41fe0ae3f56e0b470f1 100644 (file)
@@ -3874,9 +3874,6 @@ reload_as_needed (live_known)
                            spill_reg_order);
            }
 
-         if (num_eliminable && chain->need_elim)
-           update_eliminable_offsets ();
-
          if (n_reloads > 0)
            {
              rtx next = NEXT_INSN (insn);
@@ -3923,6 +3920,10 @@ reload_as_needed (live_known)
                      NOTE_LINE_NUMBER (p) = NOTE_INSN_DELETED;
                    }
            }
+
+         if (num_eliminable && chain->need_elim)
+           update_eliminable_offsets ();
+
          /* Any previously reloaded spilled pseudo reg, stored in this insn,
             is no longer validly lying around to save a future reload.
             Note that this does not detect pseudos that were reloaded
@@ -7599,7 +7600,9 @@ delete_output_reload (insn, j, last_reload_reg)
     }
   n_occurrences = count_occurrences (PATTERN (insn), reg, 0);
   if (substed)
-    n_occurrences += count_occurrences (PATTERN (insn), substed, 0);
+    n_occurrences += count_occurrences (PATTERN (insn),
+                                       eliminate_regs (substed, 0,
+                                                       NULL_RTX), 0);
   if (n_occurrences > n_inherited)
     return;
 
This page took 0.076563 seconds and 5 git commands to generate.