summaryrefslogtreecommitdiff
path: root/gcc/tree-parloops.c
diff options
context:
space:
mode:
authorabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-25 13:11:50 +0000
committerabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-25 13:11:50 +0000
commit713f1f148ae226c627dbe7efd26e04c3b7fc1b3d (patch)
tree5fd391bdadd032d481ad489b30f553a206beaccc /gcc/tree-parloops.c
parent92355c312b1aa91a71bb0a0f85291c9ced93a4b3 (diff)
downloadgcc-713f1f148ae226c627dbe7efd26e04c3b7fc1b3d.tar.gz
* tree-predcom.c (tree_predictive_commoning_loop): Bail out when
compute_data_dependences_for_loop returns false. * tree-parloops.c (loop_parallel_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183518 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r--gcc/tree-parloops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 339ddcc18a5..c5b76559ba0 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -387,8 +387,14 @@ loop_parallel_p (struct loop *loop, struct obstack * parloop_obstack)
datarefs = VEC_alloc (data_reference_p, heap, 10);
dependence_relations = VEC_alloc (ddr_p, heap, 10 * 10);
loop_nest = VEC_alloc (loop_p, heap, 3);
- compute_data_dependences_for_loop (loop, true, &loop_nest, &datarefs,
- &dependence_relations);
+ if (! compute_data_dependences_for_loop (loop, true, &loop_nest, &datarefs,
+ &dependence_relations))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, " FAILED: cannot analyze data dependencies\n");
+ ret = false;
+ goto end;
+ }
if (dump_file && (dump_flags & TDF_DETAILS))
dump_data_dependence_relations (dump_file, dependence_relations);
@@ -405,6 +411,7 @@ loop_parallel_p (struct loop *loop, struct obstack * parloop_obstack)
fprintf (dump_file,
" FAILED: data dependencies exist across iterations\n");
+ end:
VEC_free (loop_p, heap, loop_nest);
free_dependence_relations (dependence_relations);
free_data_refs (datarefs);