diff options
| author | Tobias Grosser <tobias@grosser.es> | 2014-03-21 15:12:09 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2014-03-21 15:12:09 +0000 |
| commit | e275e9216bafc424d83b28cceecf6b257eb99ac4 (patch) | |
| tree | 063f387344caa6ef9a9edfabc3c12f8fbf98e621 /polly/lib/CodeGen/IslAst.cpp | |
| parent | df115d9bf3542b53ba7ebd666ba6cd7008a4ccfb (diff) | |
| download | bcm5719-llvm-e275e9216bafc424d83b28cceecf6b257eb99ac4.tar.gz bcm5719-llvm-e275e9216bafc424d83b28cceecf6b257eb99ac4.zip | |
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
Diffstat (limited to 'polly/lib/CodeGen/IslAst.cpp')
| -rw-r--r-- | polly/lib/CodeGen/IslAst.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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); |

