diff options
| author | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-02-14 14:02:44 +0000 |
|---|---|---|
| committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-02-14 14:02:44 +0000 |
| commit | 00383a75b89c26f7be749043afa502dc3b512eb8 (patch) | |
| tree | ab2c413ba8c31e49ff1edffeb2bf3c3e31e66f0f | |
| parent | 5f9a7620569a01883edf0646b93724b880a211ed (diff) | |
| download | bcm5719-llvm-00383a75b89c26f7be749043afa502dc3b512eb8.tar.gz bcm5719-llvm-00383a75b89c26f7be749043afa502dc3b512eb8.zip | |
CodeGen: Get dependences for validity and proximity separately
This change itself should not change functionality, but it will make it easier
to support use different dependence kinds in for validity and proximity
constraints.
llvm-svn: 150483
| -rw-r--r-- | polly/lib/ScheduleOptimizer.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/polly/lib/ScheduleOptimizer.cpp b/polly/lib/ScheduleOptimizer.cpp index 7df544a40f6..0a1c82a1910 100644 --- a/polly/lib/ScheduleOptimizer.cpp +++ b/polly/lib/ScheduleOptimizer.cpp @@ -418,11 +418,13 @@ bool IslScheduleOptimizer::runOnScop(Scop &S) { Dependences *D = &getAnalysis<Dependences>(); // Build input data. - int DependencyKinds = Dependences::TYPE_RAW - | Dependences::TYPE_WAR - | Dependences::TYPE_WAW; + int ValidityKinds = Dependences::TYPE_RAW | Dependences::TYPE_WAR + | Dependences::TYPE_WAW; + int ProximityKinds = Dependences::TYPE_RAW | Dependences::TYPE_WAR + | Dependences::TYPE_WAW; - isl_union_map *Dependences = D->getDependences(DependencyKinds); + isl_union_map *Validity = D->getDependences(ValidityKinds); + isl_union_map *Proximity = D->getDependences(ProximityKinds); isl_union_set *Domain = S.getDomains(); if (!Domain) @@ -436,19 +438,16 @@ bool IslScheduleOptimizer::runOnScop(Scop &S) { // interesting anyway. In some cases this option may stop the scheduler to // find any schedule. if (SimplifyDeps == "yes") { - Dependences = isl_union_map_gist_domain(Dependences, - isl_union_set_copy(Domain)); - Dependences = isl_union_map_gist_range(Dependences, - isl_union_set_copy(Domain)); + Validity = isl_union_map_gist_domain(Validity, isl_union_set_copy(Domain)); + Validity = isl_union_map_gist_range(Validity, isl_union_set_copy(Domain)); + Proximity = isl_union_map_gist_domain(Proximity, + isl_union_set_copy(Domain)); + Proximity = isl_union_map_gist_range(Proximity, isl_union_set_copy(Domain)); } else if (SimplifyDeps != "no") { errs() << "warning: Option -polly-opt-simplify-deps should either be 'yes' " "or 'no'. Falling back to default: 'yes'\n"; } - isl_schedule *Schedule; - isl_union_map *Proximity = isl_union_map_copy(Dependences); - isl_union_map *Validity = Dependences; - DEBUG(dbgs() << "\n\nCompute schedule from: "); DEBUG(dbgs() << "Domain := "; isl_union_set_dump(Domain); dbgs() << ";\n"); DEBUG(dbgs() << "Proximity := "; isl_union_map_dump(Proximity); @@ -484,6 +483,7 @@ bool IslScheduleOptimizer::runOnScop(Scop &S) { isl_options_set_schedule_maximize_band_depth(S.getIslCtx(), IslMaximizeBands); isl_options_set_on_error(S.getIslCtx(), ISL_ON_ERROR_CONTINUE); + isl_schedule *Schedule; Schedule = isl_union_set_compute_schedule(Domain, Validity, Proximity); isl_options_set_on_error(S.getIslCtx(), ISL_ON_ERROR_ABORT); |

