[Haifa Scheduler] Fix latent bug in macro-fusion/instruction grouping
authorJames Greenhalgh <james.greenhalgh@arm.com>
Tue, 17 Feb 2015 09:19:33 +0000 (09:19 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Tue, 17 Feb 2015 09:19:33 +0000 (09:19 +0000)
gcc/

* haifa-sched.c (recompute_todo_spec): Treat SCHED_GROUP_P
as forcing a HARD_DEP between instructions, thereby
disallowing rewriting to break dependencies.

From-SVN: r220751

gcc/ChangeLog
gcc/haifa-sched.c

index d7fc1f4b06ac1a7e1a835fb563fc18ebcda18dbb..932d2086e61c4a4639509ed45eb8701f67578db9 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-17  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * haifa-sched.c (recompute_todo_spec): Treat SCHED_GROUP_P
+       as forcing a HARD_DEP between instructions, thereby
+       disallowing rewriting to break dependencies.
+
 2015-02-16  Jan Hubicka  <hubicka@ucw.cz>
 
        * symtab.c (symtab_node::verify_base): Verify body_removed->!definiton
index 64c8c9c1f70bb7a685098f64249848d933c22482..7aeedc339d5eb8a066cda306789335a8fbbe0f29 100644 (file)
@@ -1233,6 +1233,11 @@ recompute_todo_spec (rtx_insn *next, bool for_backtrack)
   if (!sd_lists_empty_p (next, SD_LIST_HARD_BACK))
     return HARD_DEP;
 
+  /* If NEXT is intended to sit adjacent to this instruction, we don't
+     want to try to break any dependencies.  Treat it as a HARD_DEP.  */
+  if (SCHED_GROUP_P (next))
+    return HARD_DEP;
+
   /* Now we've got NEXT with speculative deps only.
      1. Look at the deps to see what we have to do.
      2. Check if we can do 'todo'.  */