]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sched-deps.c (sched_analyze_insn): Make clobber insns depend on call insns.
authorRichard Henderson <rth@redhat.com>
Fri, 27 Sep 2002 01:13:28 +0000 (18:13 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 27 Sep 2002 01:13:28 +0000 (18:13 -0700)
        * sched-deps.c (sched_analyze_insn): Make clobber insns depend
        on call insns.

From-SVN: r57568

gcc/ChangeLog
gcc/sched-deps.c

index a644fa8bf3cd24b73e670ece3d7d150e248323f0..7dd1e5acddc724df043805df161f0c4f5e8a136a 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-26  Richard Henderson  <rth@redhat.com>
+
+       PR c/7160
+       * sched-deps.c (sched_analyze_insn): Make clobber insns depend
+       on call insns.
+
 2002-09-27  Alan Modra  <amodra@bigpond.net.au>
 
        * doloop.c (doloop_modify_runtime <biv skips initial incr>): Adjust
index f2f64d39669ba199ea4f7e3ed112374b1a10fc33..4e14ee26eaaa419ef60a50a6e9af534b4818d905 100644 (file)
@@ -923,7 +923,15 @@ sched_analyze_insn (deps, x, insn, loop_notes)
       code = GET_CODE (x);
     }
   if (code == SET || code == CLOBBER)
-    sched_analyze_1 (deps, x, insn);
+    {
+      sched_analyze_1 (deps, x, insn);
+
+      /* Bare clobber insns are used for letting life analysis, reg-stack
+        and others know that a value is dead.  Depend on the last call
+        instruction so that reg-stack won't get confused.  */
+      if (code == CLOBBER)
+       add_dependence_list (insn, deps->last_function_call, REG_DEP_OUTPUT);
+    }
   else if (code == PARALLEL)
     {
       int i;