Rotate bundles earlier in ia64_sched_reorder
authorBernd Schmidt <bernds@redhat.com>
Thu, 1 Mar 2001 14:25:30 +0000 (14:25 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 1 Mar 2001 14:25:30 +0000 (14:25 +0000)
From-SVN: r40157

gcc/ChangeLog
gcc/config/ia64/ia64.c

index c72d69ed0fac1d3e8f359debff82f1246ada2865..0247ae2b1172c31485bc3cdb67a0c4bcad2ce28a 100644 (file)
@@ -5,6 +5,7 @@
        (gen_nop_type): New function.
        (ia64_emit_nops): New function.
        (ia64_reorg): Call it.
+       (ia64_sched_reorder): Move code that rotates bundles up a bit.
 
        * reload1.c (eliminate_regs_in_insn): Restrict the special case
        code not to try to optimize adds with anything but a REG destination.
index 1b49a5cd60bef3e84131d3b3eca0cdffd246823b..2b72959bdbb7777e5237dbe08787658618832797 100644 (file)
@@ -5665,6 +5665,15 @@ ia64_sched_reorder (dump, sched_verbose, ready, pn_ready, reorder_type)
       dump_current_packet (dump);
     }
 
+  if (reorder_type == 0)
+    {
+      if (sched_data.cur == 6)
+       rotate_two_bundles (sched_verbose ? dump : NULL);
+      else if (sched_data.cur >= 3)
+       rotate_one_bundle (sched_verbose ? dump : NULL);
+      sched_data.first_slot = sched_data.cur;
+    }
+
   /* First, move all USEs, CLOBBERs and other crud out of the way.  */
   highest = ready[n_ready - 1];
   for (insnp = ready; insnp < e_ready; insnp++)
@@ -5738,15 +5747,6 @@ ia64_sched_reorder (dump, sched_verbose, ready, pn_ready, reorder_type)
        }
     }
 
-  if (reorder_type == 0)
-    {
-      if (sched_data.cur == 6)
-       rotate_two_bundles (sched_verbose ? dump : NULL);
-      else if (sched_data.cur >= 3)
-       rotate_one_bundle (sched_verbose ? dump : NULL);
-      sched_data.first_slot = sched_data.cur;
-    }
-
   return itanium_reorder (sched_verbose ? dump : NULL,
                          ready, e_ready, reorder_type == 1);
 }