sched-deps.c (sched_analyze_insn): Make sure to add insn to reg_last->sets after...
authorGlen Nakamura <glen@imodulo.com>
Sun, 8 Sep 2002 03:42:46 +0000 (03:42 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 8 Sep 2002 03:42:46 +0000 (20:42 -0700)
        * sched-deps.c (sched_analyze_insn): Make sure to add insn
        to reg_last->sets after flushing the dependency lists to guarantee
        that subsequent clobbers will be dependent on it.

From-SVN: r56929

gcc/ChangeLog
gcc/sched-deps.c

index 9ca0341e3601b4a52711219f457b8c879b040b5c..5dadbedeb84a0283ebed4abe1752358ec974d26b 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-07  Glen Nakamura  <glen@imodulo.com>
+
+       * sched-deps.c (sched_analyze_insn): Make sure to add insn
+       to reg_last->sets after flushing the dependency lists to guarantee
+       that subsequent clobbers will be dependent on it.
+
 2002-09-07  Igor Shevlyakov <igor@microunity.com>
   
        * combine.c (simplify_shift_const): Calculate rotate count
index a5e9c08b5bfcab6487c9044a4352e7778cd83048..32260a89f504a69281973756a6af5233e342567c 100644 (file)
@@ -1117,8 +1117,6 @@ sched_analyze_insn (deps, x, insn, loop_notes)
          EXECUTE_IF_SET_IN_REG_SET (reg_pending_clobbers, 0, i,
            {
              struct deps_reg *reg_last = &deps->reg_last[i];
-             add_dependence_list (insn, reg_last->sets, REG_DEP_OUTPUT);
-             add_dependence_list (insn, reg_last->uses, REG_DEP_ANTI);
              if (reg_last->uses_length > MAX_PENDING_LIST_LENGTH
                  || reg_last->clobbers_length > MAX_PENDING_LIST_LENGTH)
                {
@@ -1128,6 +1126,7 @@ sched_analyze_insn (deps, x, insn, loop_notes)
                                                REG_DEP_ANTI);
                  add_dependence_list_and_free (insn, &reg_last->clobbers,
                                                REG_DEP_OUTPUT);
+                 reg_last->sets = alloc_INSN_LIST (insn, reg_last->sets);
                  reg_last->clobbers_length = 0;
                  reg_last->uses_length = 0;
                }