diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-28 16:38:52 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-28 16:38:52 +0000 |
commit | 741042812671fa52c64a0281f12ceb8c56305721 (patch) | |
tree | 1f4583d3d7caa4dbab0348b6495043b79b923877 /gcc/graphite-isl-ast-to-gimple.c | |
parent | b547a9b865e900b7b69dd1da95d056de6d9ea7bc (diff) | |
download | gcc-741042812671fa52c64a0281f12ceb8c56305721.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232932 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-isl-ast-to-gimple.c')
-rw-r--r-- | gcc/graphite-isl-ast-to-gimple.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 81ed3046e1d..47225ef8a3e 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -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); /* At this point we should know the exact scev for each - scalar SSA_NAME used in the scop: all the other scalar - SSA_NAMEs should have been translated out of SSA using - arrays with one element. */ - tree new_expr; - if (chrec_contains_undetermined (scev)) - { - codegen_error = true; - return build_zero_cst (TREE_TYPE (old_name)); - } + scalar SSA_NAME used in the scop. */ + gcc_assert (!chrec_contains_undetermined (scev)); - 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 uses of the new induction variables. We should be able to use new_expr instead of the old_name in the newly generated loop nest. */ - if (chrec_contains_undetermined (new_expr) - || tree_contains_chrecs (new_expr, NULL)) - { - codegen_error = true; - return build_zero_cst (TREE_TYPE (old_name)); - } + gcc_assert (!chrec_contains_undetermined (new_expr) + && !tree_contains_chrecs (new_expr, NULL)); - /* We should check all the operands and all of them should dominate the use at - new_expr. */ if (TREE_CODE (new_expr) == SSA_NAME) { 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, substitution map RENAME_MAP, inserting the gimplification code at GSI_TGT, for the translation REGION, with the original copied statement in LOOP, and using the induction variable renaming map - IV_MAP. Returns true when something has been renamed. codegen_error - is set when the code generation cannot continue. */ + IV_MAP. Returns true when something has been renamed. */ bool translate_isl_ast_to_gimple::rename_uses (gimple *copy, |