Commit 9b496f67 by Sebastian Pop Committed by Sebastian Pop

assert instead of silently failing code gen

	* graphite-isl-ast-to-gimple.c (get_rename_from_scev): Assert instead of
	setting codegen_error to fail codegen.

From-SVN: r232932
parent 9925bb88
2016-01-28 Sebastian Pop <s.pop@samsung.com>
* graphite-isl-ast-to-gimple.c (get_rename_from_scev): Assert instead of
setting codegen_error to fail codegen.
2016-01-28 Jason Merrill <jason@redhat.com> 2016-01-28 Jason Merrill <jason@redhat.com>
* tree.h (BINFO_FLAG_0): Rename from BINFO_MARKED. * tree.h (BINFO_FLAG_0): Rename from BINFO_MARKED.
......
...@@ -1833,31 +1833,18 @@ get_rename_from_scev (tree old_name, gimple_seq *stmts, loop_p loop, ...@@ -1833,31 +1833,18 @@ get_rename_from_scev (tree old_name, gimple_seq *stmts, loop_p loop,
tree scev = scalar_evolution_in_region (region->region, loop, old_name); tree scev = scalar_evolution_in_region (region->region, loop, old_name);
/* At this point we should know the exact scev for each /* At this point we should know the exact scev for each
scalar SSA_NAME used in the scop: all the other scalar scalar SSA_NAME used in the scop. */
SSA_NAMEs should have been translated out of SSA using gcc_assert (!chrec_contains_undetermined (scev));
arrays with one element. */
tree new_expr;
if (chrec_contains_undetermined (scev))
{
codegen_error = true;
return build_zero_cst (TREE_TYPE (old_name));
}
new_expr = chrec_apply_map (scev, iv_map); tree 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
able to use new_expr instead of the old_name in the newly able to use new_expr instead of the old_name in the newly
generated loop nest. */ generated loop nest. */
if (chrec_contains_undetermined (new_expr) gcc_assert (!chrec_contains_undetermined (new_expr)
|| tree_contains_chrecs (new_expr, NULL)) && !tree_contains_chrecs (new_expr, NULL));
{
codegen_error = true;
return build_zero_cst (TREE_TYPE (old_name));
}
/* We should check all the operands and all of them should dominate the use at
new_expr. */
if (TREE_CODE (new_expr) == SSA_NAME) if (TREE_CODE (new_expr) == SSA_NAME)
{ {
basic_block bb = gimple_bb (SSA_NAME_DEF_STMT (new_expr)); basic_block bb = gimple_bb (SSA_NAME_DEF_STMT (new_expr));
...@@ -1898,8 +1885,7 @@ get_rename_from_scev (tree old_name, gimple_seq *stmts, loop_p loop, ...@@ -1898,8 +1885,7 @@ get_rename_from_scev (tree old_name, gimple_seq *stmts, loop_p loop,
substitution map RENAME_MAP, inserting the gimplification code at substitution map RENAME_MAP, inserting the gimplification code at
GSI_TGT, for the translation REGION, with the original copied GSI_TGT, for the translation REGION, with the original copied
statement in LOOP, and using the induction variable renaming map statement in LOOP, and using the induction variable renaming map
IV_MAP. Returns true when something has been renamed. codegen_error IV_MAP. Returns true when something has been renamed. */
is set when the code generation cannot continue. */
bool bool
translate_isl_ast_to_gimple::rename_uses (gimple *copy, translate_isl_ast_to_gimple::rename_uses (gimple *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