diff options
| author | Johannes Doerfert <jdoerfert@codeaurora.org> | 2014-06-20 16:37:11 +0000 |
|---|---|---|
| committer | Johannes Doerfert <jdoerfert@codeaurora.org> | 2014-06-20 16:37:11 +0000 |
| commit | f1906138b4cb4562b5489623f52f49dc6bef28e7 (patch) | |
| tree | 1b89aeeddd9d07bea828547663b297ab8db8f084 /polly/lib/CodeGen/IslAst.cpp | |
| parent | 59c6ab20d64a6705ae027ba8f2226a1e1fe5065e (diff) | |
| download | bcm5719-llvm-f1906138b4cb4562b5489623f52f49dc6bef28e7.tar.gz bcm5719-llvm-f1906138b4cb4562b5489623f52f49dc6bef28e7.zip | |
Model statement wise reduction dependences
+ Collect reduction dependences
+ Introduced TYPE_RED in Dependences.h which can be used to obtain the
reduction dependences
+ Used TYPE_RED to prevent parallelization while we do not have a privatizing
code generation
+ Relax the dependences for non-parallel code generation
+ Add privatization dependences to ensure correctness
+ 12 Test cases to check for reduction and privatization dependences
llvm-svn: 211369
Diffstat (limited to 'polly/lib/CodeGen/IslAst.cpp')
| -rw-r--r-- | polly/lib/CodeGen/IslAst.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index 0e2ddcc72b6..57814e4464a 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -166,7 +166,9 @@ static bool astScheduleDimIsParallel(__isl_keep isl_ast_build *Build, Dimension = isl_space_dim(ScheduleSpace, isl_dim_out) - 1; - Deps = D->getDependences(Dependences::TYPE_ALL); + // FIXME: We can remove ignore reduction dependences in case we privatize the + // memory locations the reduction statements reduce into. + Deps = D->getDependences(Dependences::TYPE_ALL | Dependences::TYPE_RED); Deps = isl_union_map_apply_range(Deps, isl_union_map_copy(Schedule)); Deps = isl_union_map_apply_domain(Deps, Schedule); |

