diff options
| author | Huihui Zhang <huihuiz@codeaurora.org> | 2018-04-04 18:08:13 +0000 |
|---|---|---|
| committer | Huihui Zhang <huihuiz@codeaurora.org> | 2018-04-04 18:08:13 +0000 |
| commit | 71e54ccd064585614d4951b3573ec932b45f98c2 (patch) | |
| tree | d0dfe35af5c02dce9c7c38ed82640a1013fcb00d /polly/lib/CodeGen | |
| parent | ea5f34b8ffd09e87486bfacf8c068f150ddbb2c7 (diff) | |
| download | bcm5719-llvm-71e54ccd064585614d4951b3573ec932b45f98c2.tar.gz bcm5719-llvm-71e54ccd064585614d4951b3573ec932b45f98c2.zip | |
[Polly][IslAst] Fix minimal dependence distance.
Summary:
When checking the parallelism of a scheduling dimension, we first check if excluding reduction dependences the loop is parallel or not.
If the loop is not parallel, then we need to return the minimal dependence distance of all data dependences, including the previously subtracted reduction dependences.
Reviewers: grosser, Meinersbur, efriedma, eli.friedman, jdoerfert, bollu
Reviewed By: Meinersbur
Subscribers: llvm-commits, pollydev
Tags: #polly
Differential Revision: https://reviews.llvm.org/D45236
llvm-svn: 329214
Diffstat (limited to 'polly/lib/CodeGen')
| -rw-r--r-- | polly/lib/CodeGen/IslAst.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index 23767cfc689..7e8739de8a2 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -219,9 +219,14 @@ static bool astScheduleDimIsParallel(__isl_keep isl_ast_build *Build, isl_union_map *Deps = D->getDependences( Dependences::TYPE_RAW | Dependences::TYPE_WAW | Dependences::TYPE_WAR); - if (!D->isParallel(Schedule, Deps, &NodeInfo->MinimalDependenceDistance) && - !isl_union_map_free(Schedule)) + if (!D->isParallel(Schedule, Deps)) { + isl_union_map *DepsAll = + D->getDependences(Dependences::TYPE_RAW | Dependences::TYPE_WAW | + Dependences::TYPE_WAR | Dependences::TYPE_TC_RED); + D->isParallel(Schedule, DepsAll, &NodeInfo->MinimalDependenceDistance); + isl_union_map_free(Schedule); return false; + } isl_union_map *RedDeps = D->getDependences(Dependences::TYPE_TC_RED); if (!D->isParallel(Schedule, RedDeps)) |

