[llvm-commits] [polly] r150484 - in /polly/trunk/lib: Analysis/Dependences.cpp ScheduleOptimizer.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Tue Feb 14 06:02:49 PST 2012
Author: grosser
Date: Tue Feb 14 08:02:48 2012
New Revision: 150484
URL: http://llvm.org/viewvc/llvm-project?rev=150484&view=rev
Log:
ScheduleOpt: Allow to configure for which dependences to optimize
We can either optimize for RAW dependences or for all dependences.
For the moment, I do not see a big difference here.
Modified:
polly/trunk/lib/Analysis/Dependences.cpp
polly/trunk/lib/ScheduleOptimizer.cpp
Modified: polly/trunk/lib/Analysis/Dependences.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/Dependences.cpp?rev=150484&r1=150483&r2=150484&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/Dependences.cpp (original)
+++ polly/trunk/lib/Analysis/Dependences.cpp Tue Feb 14 08:02:48 2012
@@ -418,7 +418,9 @@
dependences = isl_union_map_union(dependences,
isl_union_map_copy(waw_dep));
- return isl_union_map_coalesce(dependences);
+ dependences = isl_union_map_coalesce(dependences);
+ dependences = isl_union_map_detect_equalities(dependences);
+ return dependences;
}
void Dependences::getAnalysisUsage(AnalysisUsage &AU) const {
Modified: polly/trunk/lib/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/ScheduleOptimizer.cpp?rev=150484&r1=150483&r2=150484&view=diff
==============================================================================
--- polly/trunk/lib/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/ScheduleOptimizer.cpp Tue Feb 14 08:02:48 2012
@@ -48,6 +48,11 @@
cl::location(polly::DisablePollyTiling), cl::init(false));
static cl::opt<std::string>
+OptimizeDeps("polly-opt-optimize-only",
+ cl::desc("Only a certain kind of dependences (all/raw)"),
+ cl::Hidden, cl::init("all"));
+
+static cl::opt<std::string>
SimplifyDeps("polly-opt-simplify-deps",
cl::desc("Dependences should be simplified (yes/no)"),
cl::Hidden, cl::init("yes"));
@@ -420,8 +425,22 @@
// Build input data.
int ValidityKinds = Dependences::TYPE_RAW | Dependences::TYPE_WAR
| Dependences::TYPE_WAW;
- int ProximityKinds = Dependences::TYPE_RAW | Dependences::TYPE_WAR
- | Dependences::TYPE_WAW;
+ int ProximityKinds;
+
+ if (OptimizeDeps == "all")
+ ProximityKinds = Dependences::TYPE_RAW | Dependences::TYPE_WAR
+ | Dependences::TYPE_WAW;
+ else if (OptimizeDeps == "raw")
+ ProximityKinds = Dependences::TYPE_RAW | Dependences::TYPE_WAR
+ | Dependences::TYPE_WAW;
+ else {
+ errs() << "Do not know how to optimize for '" << OptimizeDeps << "'"
+ << " Falling back to optimizing all dependences.\n";
+ ProximityKinds = Dependences::TYPE_RAW | Dependences::TYPE_WAR
+ | Dependences::TYPE_WAW;
+
+ }
+
isl_union_map *Validity = D->getDependences(ValidityKinds);
isl_union_map *Proximity = D->getDependences(ProximityKinds);
More information about the llvm-commits
mailing list