Commit 60cf26cc by Sebastian Pop Committed by Sebastian Pop

Fix PR49876: Continue code generation with integer_zero_node on gloog_error

When setting gloog_error, graphite should continue code generation
without early returns, as otherwise the SSA representation would not
be complete.  So set the new expression to integer_zero_node, that
would not require more SSA updates, and continue code generation as
nothing happened.

Regstrapped on amd64-linux.

2011-07-28  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/49876
	* sese.c (rename_uses): Do not return false on gloog_error: set
	the new_expr to integer_zero_node and continue code generation.
	(graphite_copy_stmts_from_block): Remove early exit on gloog_error.

From-SVN: r176900
parent f715f0c1
2011-07-28 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/49876
* sese.c (rename_uses): Do not return false on gloog_error: set
the new_expr to integer_zero_node and continue code generation.
(graphite_copy_stmts_from_block): Remove early exit on gloog_error.
2011-07-28 Jakub Jelinek <jakub@redhat.com> 2011-07-28 Jakub Jelinek <jakub@redhat.com>
PR debug/49846 PR debug/49846
......
...@@ -527,10 +527,10 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt, ...@@ -527,10 +527,10 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
if (chrec_contains_undetermined (scev)) if (chrec_contains_undetermined (scev))
{ {
*gloog_error = true; *gloog_error = true;
return false; new_expr = build_zero_cst (TREE_TYPE (old_name));
} }
else
new_expr = chrec_apply_map (scev, iv_map); new_expr = chrec_apply_map (scev, iv_map);
/* The apply should produce an expression tree containing /* The apply should produce an expression tree containing
the uses of the new induction variables. We should be the uses of the new induction variables. We should be
...@@ -540,12 +540,13 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt, ...@@ -540,12 +540,13 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
|| tree_contains_chrecs (new_expr, NULL)) || tree_contains_chrecs (new_expr, NULL))
{ {
*gloog_error = true; *gloog_error = true;
return false; new_expr = build_zero_cst (TREE_TYPE (old_name));
} }
else
/* Replace the old_name with the new_expr. */
new_expr = force_gimple_operand (unshare_expr (new_expr), &stmts,
true, NULL_TREE);
/* Replace the old_name with the new_expr. */
new_expr = force_gimple_operand (unshare_expr (new_expr), &stmts,
true, NULL_TREE);
gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT); gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT);
replace_exp (use_p, new_expr); replace_exp (use_p, new_expr);
...@@ -621,9 +622,6 @@ graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb, ...@@ -621,9 +622,6 @@ graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb,
gloog_error)) gloog_error))
fold_stmt_inplace (copy); fold_stmt_inplace (copy);
if (*gloog_error)
break;
update_stmt (copy); update_stmt (copy);
} }
} }
......
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