[Haifa Scheduler] Fix latent bug in macro-fusion/instruction grouping 31/45831/1
authorjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Feb 2015 09:19:33 +0000 (09:19 +0000)
committerNikolai Bozhenov <n.bozhenov@samsung.com>
Tue, 11 Aug 2015 14:12:55 +0000 (17:12 +0300)
gcc/

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

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

gcc/ChangeLog
gcc/haifa-sched.c

index 573b753..7f44065 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-01-13  Andrew Pinski   <apinski@cavium.com>
 
        * config/aarch64/aarch64.c (fusion_load_store): Check dest mode
index 4f4ab6b..706dab6 100644 (file)
@@ -1203,6 +1203,11 @@ recompute_todo_spec (rtx 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'.  */