[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-patches
Subject: Disable loop unswithing for optimize size loops
From: Jan Hubicka <jh () suse ! cz>
Date: 2008-08-31 15:53:25
Message-ID: 20080831155325.GB24439 () kam ! mff ! cuni ! cz
[Download RAW message or body]
Hi,
Tree loop unswitching lacks optimize_loop_for_size_p guard that probably
caused code size increase in FDO SPECfp today.
Honza
Index: ChangeLog
===================================================================
--- ChangeLog (revision 139830)
+++ ChangeLog (working copy)
@@ -1,5 +1,10 @@
2008-08-31 Jan Hubicka <jh@suse.cz>
+ * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Check that
+ loop is optimized for speed.
+
+2008-08-31 Jan Hubicka <jh@suse.cz>
+
* postreload-gcse.c (eliminate_partially_redundant_loads): Use optimize_bb_for_size_p.
* predict.c (maybe_hot_frequency_p): Make inline.
(maybe_hot_count_p): Break out from ...
Index: tree-ssa-loop-unswitch.c
===================================================================
--- tree-ssa-loop-unswitch.c (revision 139829)
+++ tree-ssa-loop-unswitch.c (working copy)
@@ -198,6 +198,14 @@ tree_unswitch_single_loop (struct loop *
return false;
}
+ /* Do not unswitch in cold regions. */
+ if (optimize_loop_for_size_p (loop))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, ";; Not unswitching cold loops\n");
+ return false;
+ }
+
/* The loop should not be too large, to limit code growth. */
if (tree_num_loop_insns (loop, &eni_size_weights)
> (unsigned) PARAM_VALUE (PARAM_MAX_UNSWITCH_INSNS))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic