From e275e9216bafc424d83b28cceecf6b257eb99ac4 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Fri, 21 Mar 2014 15:12:09 +0000 Subject: Return conservative result in case the dependence check timed out For complex examples it may happen that we do not compute dependences. In this case we do not want to crash, but just not detect parallel loops. llvm-svn: 204470 --- polly/lib/CodeGen/IslAst.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'polly/lib/CodeGen/IslAst.cpp') diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index 629d86c94f4..5679dfd9728 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -157,6 +157,10 @@ static bool astScheduleDimIsParallel(__isl_keep isl_ast_build *Build, isl_space *ScheduleSpace; unsigned Dimension, IsParallel; + if (!D->hasValidDependences()) { + return false; + } + Schedule = isl_ast_build_get_schedule(Build); ScheduleSpace = isl_ast_build_get_schedule_space(Build); @@ -169,7 +173,7 @@ static bool astScheduleDimIsParallel(__isl_keep isl_ast_build *Build, if (isl_union_map_is_empty(Deps)) { isl_union_map_free(Deps); isl_space_free(ScheduleSpace); - return 1; + return true; } ScheduleDeps = isl_map_from_union_map(Deps); -- cgit v1.2.3