Commit 7472eb13 by Sebastian Pop Committed by Sebastian Pop

Call compute_overall_effect_of_inner_loop from instantiate_scev_name.

2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-scalar-evolution.c (instantiate_scev_name): Do not fail
	the scev analysis when the variable is not used outside the loop
	in a close phi node: call compute_overall_effect_of_inner_loop.

From-SVN: r160510
parent c12e2a5f
2010-06-09 Sebastian Pop <sebastian.pop@amd.com> 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
* tree-scalar-evolution.c (instantiate_scev_name): Do not fail
the scev analysis when the variable is not used outside the loop
in a close phi node: call compute_overall_effect_of_inner_loop.
2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (single_pred_cond): Renamed * graphite-sese-to-poly.c (single_pred_cond): Renamed
single_pred_cond_non_loop_exit. Return NULL for loop exit edges. single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
(build_sese_conditions_before): Renamed call to single_pred_cond. (build_sese_conditions_before): Renamed call to single_pred_cond.
......
...@@ -2172,9 +2172,19 @@ instantiate_scev_name (basic_block instantiate_below, ...@@ -2172,9 +2172,19 @@ instantiate_scev_name (basic_block instantiate_below,
else else
res = chrec; res = chrec;
if (res == NULL_TREE /* When there is no loop_closed_phi_def, it means that the
|| !dominated_by_p (CDI_DOMINATORS, instantiate_below, variable is not used after the loop: try to still compute the
gimple_bb (SSA_NAME_DEF_STMT (res)))) value of the variable when exiting the loop. */
if (res == NULL_TREE)
{
loop_p loop = loop_containing_stmt (SSA_NAME_DEF_STMT (chrec));
res = analyze_scalar_evolution (loop, chrec);
res = compute_overall_effect_of_inner_loop (loop, res);
res = instantiate_scev_r (instantiate_below, evolution_loop, res,
fold_conversions, cache, size_expr);
}
else if (!dominated_by_p (CDI_DOMINATORS, instantiate_below,
gimple_bb (SSA_NAME_DEF_STMT (res))))
res = chrec_dont_know; res = chrec_dont_know;
} }
......
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