diff options
author | Tobias Grosser <tobias@grosser.es> | 2015-09-16 09:50:17 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2015-09-16 09:50:17 +0000 |
commit | e375d8058a29734a4da91f6cc709cc26e6afdd30 (patch) | |
tree | 426a1c24c246ec81b6cf3ea1954744c07906d56a /polly/lib/Analysis/DependenceInfo.cpp | |
parent | 6e6a2c9cd797c70f329fff88cc78f2a74a69e187 (diff) | |
download | bcm5719-llvm-e375d8058a29734a4da91f6cc709cc26e6afdd30.tar.gz bcm5719-llvm-e375d8058a29734a4da91f6cc709cc26e6afdd30.zip |
Add option to enable/disable reduction usage in dependence analysis
llvm-svn: 247781
Diffstat (limited to 'polly/lib/Analysis/DependenceInfo.cpp')
-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) { |