diff options
-rw-r--r-- | polly/lib/Analysis/DependenceInfo.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp index 3afa5d4287a..d6fd4a696d4 100644 --- a/polly/lib/Analysis/DependenceInfo.cpp +++ b/polly/lib/Analysis/DependenceInfo.cpp @@ -51,6 +51,12 @@ static cl::opt<bool> LegalityCheckDisabled( "disable-polly-legality", cl::desc("Disable polly legality check"), cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); +static cl::opt<bool> + UseReductions("polly-dependences-use-reductions", + cl::desc("Exploit reductions in dependence analysis"), + cl::Hidden, cl::init(true), cl::ZeroOrMore, + cl::cat(PollyCategory)); + enum AnalysisType { VALUE_BASED_ANALYSIS, MEMORY_BASED_ANALYSIS }; static cl::opt<enum AnalysisType> OptAnalysisType( @@ -79,10 +85,11 @@ static void collectInfo(Scop &S, isl_union_map **Read, isl_union_map **Write, *StmtSchedule = isl_union_map_empty(Space); SmallPtrSet<const Value *, 8> ReductionBaseValues; - for (ScopStmt &Stmt : S) - for (MemoryAccess *MA : Stmt) - if (MA->isReductionLike()) - ReductionBaseValues.insert(MA->getBaseAddr()); + if (UseReductions) + for (ScopStmt &Stmt : S) + for (MemoryAccess *MA : Stmt) + if (MA->isReductionLike()) + ReductionBaseValues.insert(MA->getBaseAddr()); for (ScopStmt &Stmt : S) { for (MemoryAccess *MA : Stmt) { |