[polly] r186251 - Dependences: Clarify difference between value and memory based dependences
Tobias Grosser
grosser at fim.uni-passau.de
Sat Jul 13 10:37:55 PDT 2013
Author: grosser
Date: Sat Jul 13 12:37:55 2013
New Revision: 186251
URL: http://llvm.org/viewvc/llvm-project?rev=186251&view=rev
Log:
Dependences: Clarify difference between value and memory based dependences
We make the option a clear choice between the two analysis types and add
descriptions about the difference between the two.
Modified:
polly/trunk/lib/Analysis/Dependences.cpp
polly/trunk/test/Dependences/do_pluto_matmult.ll
Modified: polly/trunk/lib/Analysis/Dependences.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/Dependences.cpp?rev=186251&r1=186250&r2=186251&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/Dependences.cpp (original)
+++ polly/trunk/lib/Analysis/Dependences.cpp Sat Jul 13 12:37:55 2013
@@ -38,10 +38,20 @@ LegalityCheckDisabled("disable-polly-leg
cl::desc("Disable polly legality check"), cl::Hidden,
cl::init(false), cl::cat(PollyCategory));
-static cl::opt<bool>
-ValueDependences("polly-value-dependences",
- cl::desc("Use value instead of memory based dependences"),
- cl::Hidden, cl::init(true), cl::cat(PollyCategory));
+enum AnalysisType {
+ VALUE_BASED_ANALYSIS,
+ MEMORY_BASED_ANALYSIS
+};
+
+static cl::opt<enum AnalysisType> OptAnalysisType(
+ "polly-dependences-analysis-type",
+ cl::desc("The kind of dependence analysis to use"),
+ cl::values(clEnumValN(VALUE_BASED_ANALYSIS, "value-based",
+ "Exact dependences without transitive dependences"),
+ clEnumValN(MEMORY_BASED_ANALYSIS, "memory-based",
+ "Overapproximation of dependences"),
+ clEnumValEnd),
+ cl::Hidden, cl::init(VALUE_BASED_ANALYSIS), cl::cat(PollyCategory));
//===----------------------------------------------------------------------===//
Dependences::Dependences() : ScopPass(ID) { RAW = WAR = WAW = NULL; }
@@ -80,7 +90,7 @@ void Dependences::calculateDependences(S
collectInfo(S, &Read, &Write, &MayWrite, &Schedule);
- if (ValueDependences) {
+ if (OptAnalysisType == VALUE_BASED_ANALYSIS) {
isl_union_map_compute_flow(
isl_union_map_copy(Read), isl_union_map_copy(Write),
isl_union_map_copy(MayWrite), isl_union_map_copy(Schedule), &RAW, NULL,
Modified: polly/trunk/test/Dependences/do_pluto_matmult.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Dependences/do_pluto_matmult.ll?rev=186251&r1=186250&r2=186251&view=diff
==============================================================================
--- polly/trunk/test/Dependences/do_pluto_matmult.ll (original)
+++ polly/trunk/test/Dependences/do_pluto_matmult.ll Sat Jul 13 12:37:55 2013
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -basicaa -polly-dependences -analyze -polly-value-dependences=true < %s | FileCheck %s -check-prefix=VALUE
-; RUN: opt %loadPolly -basicaa -polly-dependences -analyze -polly-value-dependences=false < %s | FileCheck %s -check-prefix=MEMORY
+; RUN: opt %loadPolly -basicaa -polly-dependences -analyze -polly-dependences-analysis-type=value-based < %s | FileCheck %s -check-prefix=VALUE
+; RUN: opt %loadPolly -basicaa -polly-dependences -analyze -polly-dependences-analysis-type=memory-based < %s | FileCheck %s -check-prefix=MEMORY
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
More information about the llvm-commits
mailing list