summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpolly/include/polly/Dependences.h13
-rw-r--r--polly/lib/Analysis/Dependences.cpp4
-rw-r--r--polly/lib/CodeGen/IslAst.cpp3
3 files changed, 9 insertions, 11 deletions
diff --git a/polly/include/polly/Dependences.h b/polly/include/polly/Dependences.h
index 5be1ba70aa0..5b09ab969bf 100755
--- a/polly/include/polly/Dependences.h
+++ b/polly/include/polly/Dependences.h
@@ -47,11 +47,11 @@ public:
/// @brief The type of the dependences.
///
- /// Reduction dependences are not included in TYPE_ALL dependences because we
- /// can ignore them during the scheduling. This is the case since the order in
- /// which the reduction statements are executed does not matter. However, if
- /// they are executed in parallel we need to take additional measures (e.g.,
- /// privatization) to ensure a correct result.
+ /// Reduction dependences are seperated because they can be ignored during
+ /// the scheduling. This is the case since the order in which the reduction
+ /// statements are executed does not matter. However, if they are executed
+ /// in parallel we need to take additional measures (e.g., privatization)
+ /// to ensure a correct result.
enum Type {
// Write after read
TYPE_WAR = 0x1,
@@ -64,9 +64,6 @@ public:
// Reduction dependences
TYPE_RED = 0x8,
-
- // All (validity) dependences
- TYPE_ALL = (TYPE_WAR | TYPE_RAW | TYPE_WAW)
};
typedef std::map<ScopStmt *, isl_map *> StatementToIslMapTy;
diff --git a/polly/lib/Analysis/Dependences.cpp b/polly/lib/Analysis/Dependences.cpp
index 37be06c70f1..0390409ae3c 100644
--- a/polly/lib/Analysis/Dependences.cpp
+++ b/polly/lib/Analysis/Dependences.cpp
@@ -369,7 +369,7 @@ bool Dependences::isValidScattering(StatementToIslMapTy *NewScattering) {
if (LegalityCheckDisabled)
return true;
- isl_union_map *Dependences = getDependences(TYPE_ALL);
+ isl_union_map *Dependences = getDependences(TYPE_RAW | TYPE_WAW | TYPE_WAR);
isl_space *Space = S.getParamSpace();
isl_union_map *Scattering = isl_union_map_empty(Space);
@@ -442,7 +442,7 @@ bool Dependences::isParallelDimension(__isl_take isl_set *ScheduleSubset,
// FIXME: We can remove ignore reduction dependences in case we privatize the
// memory locations the reduction statements reduce into.
- Deps = getDependences(TYPE_ALL | TYPE_RED);
+ Deps = getDependences(TYPE_RAW | TYPE_WAW | TYPE_WAR | TYPE_RED);
if (isl_union_map_is_empty(Deps)) {
isl_union_map_free(Deps);
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp
index 57814e4464a..b31f7dcf52b 100644
--- a/polly/lib/CodeGen/IslAst.cpp
+++ b/polly/lib/CodeGen/IslAst.cpp
@@ -168,7 +168,8 @@ static bool astScheduleDimIsParallel(__isl_keep isl_ast_build *Build,
// 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 = D->getDependences(Dependences::TYPE_RAW | Dependences::TYPE_WAW |
+ Dependences::TYPE_WAR | Dependences::TYPE_RED);
Deps = isl_union_map_apply_range(Deps, isl_union_map_copy(Schedule));
Deps = isl_union_map_apply_domain(Deps, Schedule);
OpenPOWER on IntegriCloud