aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/graphite.c')
-rw-r--r--gcc/graphite.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 773203e..5316bc4 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -333,12 +333,16 @@ graphite_transform_loops (void)
if (dump_file && dump_flags)
print_scop (dump_file, scop);
-
if (scop->poly_scop_p
- && apply_poly_transforms (scop)
- && graphite_regenerate_ast_isl (scop))
- need_cfg_cleanup_p = true;
-
+ && apply_poly_transforms (scop))
+ {
+ need_cfg_cleanup_p = true;
+ /* When code generation is not successful, do not continue
+ generating code for the next scops: the IR has to be cleaned up
+ and could be in an inconsistent state. */
+ if (!graphite_regenerate_ast_isl (scop))
+ break;
+ }
}
free_scops (scops);