tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Check that loop is optimized for speed.
* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Check that loop is optimized for speed. From-SVN: r139834
This commit is contained in:
parent
f885a45b90
commit
079990a2bf
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
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 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/37289
|
||||
|
|
|
@ -198,6 +198,14 @@ tree_unswitch_single_loop (struct loop *loop, int num)
|
|||
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))
|
||||
|
|
Loading…
Add table
Reference in a new issue