tree-ssa-pre.c (fini_pre): Take in_fre parameter.
2008-08-01 Richard Guenther <rguenther@suse.de> * tree-ssa-pre.c (fini_pre): Take in_fre parameter. Free loop information only if we initialized it. (execute_pre): Call fini_pre with in_fre. * tree-ssa-loop-ivcanon (try_unroll_loop_completely): Dump if we do not unroll because we hit max-completely-peeled-insns. Use our estimation for consistency, do allow shrinking. From-SVN: r138522
This commit is contained in:
parent
769b26a6bd
commit
678e7c6504
3 changed files with 23 additions and 7 deletions
|
@ -1,3 +1,12 @@
|
|||
2008-08-01 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* tree-ssa-pre.c (fini_pre): Take in_fre parameter. Free
|
||||
loop information only if we initialized it.
|
||||
(execute_pre): Call fini_pre with in_fre.
|
||||
* tree-ssa-loop-ivcanon (try_unroll_loop_completely): Dump
|
||||
if we do not unroll because we hit max-completely-peeled-insns.
|
||||
Use our estimation for consistency, do allow shrinking.
|
||||
|
||||
2008-08-01 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/36997
|
||||
|
|
|
@ -184,10 +184,6 @@ try_unroll_loop_completely (struct loop *loop,
|
|||
|
||||
ninsns = tree_num_loop_insns (loop, &eni_size_weights);
|
||||
|
||||
if (n_unroll * ninsns
|
||||
> (unsigned) PARAM_VALUE (PARAM_MAX_COMPLETELY_PEELED_INSNS))
|
||||
return false;
|
||||
|
||||
unr_insns = estimated_unrolled_size (ninsns, n_unroll);
|
||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||
{
|
||||
|
@ -196,6 +192,17 @@ try_unroll_loop_completely (struct loop *loop,
|
|||
(int) unr_insns);
|
||||
}
|
||||
|
||||
if (unr_insns > ninsns
|
||||
&& (unr_insns
|
||||
> (unsigned) PARAM_VALUE (PARAM_MAX_COMPLETELY_PEELED_INSNS)))
|
||||
{
|
||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||
fprintf (dump_file, "Not unrolling loop %d "
|
||||
"(--param max-completely-peeled-insns limit reached).\n",
|
||||
loop->num);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ul == UL_NO_GROWTH
|
||||
&& unr_insns > ninsns)
|
||||
{
|
||||
|
|
|
@ -4086,7 +4086,7 @@ init_pre (bool do_fre)
|
|||
/* Deallocate data structures used by PRE. */
|
||||
|
||||
static void
|
||||
fini_pre (void)
|
||||
fini_pre (bool do_fre)
|
||||
{
|
||||
basic_block bb;
|
||||
|
||||
|
@ -4117,7 +4117,7 @@ fini_pre (void)
|
|||
|
||||
BITMAP_FREE (need_eh_cleanup);
|
||||
|
||||
if (current_loops != NULL)
|
||||
if (!do_fre)
|
||||
loop_optimizer_finalize ();
|
||||
}
|
||||
|
||||
|
@ -4192,7 +4192,7 @@ execute_pre (bool do_fre ATTRIBUTE_UNUSED)
|
|||
if (!do_fre)
|
||||
remove_dead_inserted_code ();
|
||||
|
||||
fini_pre ();
|
||||
fini_pre (do_fre);
|
||||
|
||||
return todo;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue