Commit 678e7c65 by Richard Guenther Committed by Richard Biener

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
parent 769b26a6
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
* gimplify.c (gimplify_call_expr): Set error_mark_node on GS_ERROR.
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment