* loop.c (scan_loop): Don't call move_moveables for optimize_size.
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Thu, 14 May 1998 00:50:07 +0000 (00:50 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 14 May 1998 00:50:07 +0000 (18:50 -0600)
From-SVN: r19736

gcc/ChangeLog
gcc/loop.c

index 807e2b9cff1e3d1ea840560b101caab8f38b427b..b8964b385bdd82964df21fbe5c479d56cd2c776e 100644 (file)
@@ -7,6 +7,8 @@ Thu May 14 08:41:46 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
 Thu May 14 02:17:17 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
+       * loop.c (scan_loop): Don't call move_moveables for optimize_size.
+
        * reload1.c (merge_assigned_reloads):  When merging, reset
        reload_spill_index for the eliminated reload.
 
index 6765b20e61c090bcdafed235c5e5a71d88ca06b0..9625febe0549fc35ddf9e15b2c03cfb8ed5934a5 100644 (file)
@@ -1063,10 +1063,14 @@ scan_loop (loop_start, end, nregs, unroll_p)
   combine_movables (movables, nregs);
        
   /* Now consider each movable insn to decide whether it is worth moving.
-     Store 0 in n_times_set for each reg that is moved.  */
+     Store 0 in n_times_set for each reg that is moved.
 
-  move_movables (movables, threshold,
-                insn_count, loop_start, end, nregs);
+     Generally this increases code size, so do not move moveables when
+     optimizing for code size.  */
+
+  if (! optimize_size)
+    move_movables (movables, threshold,
+                  insn_count, loop_start, end, nregs);
 
   /* Now candidates that still are negative are those not moved.
      Change n_times_set to indicate that those are not actually invariant.  */