[polly] r245300 - Use schedule trees to compute dependences

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 08:05:30 PDT 2015


Author: grosser
Date: Tue Aug 18 10:05:29 2015
New Revision: 245300

URL: http://llvm.org/viewvc/llvm-project?rev=245300&view=rev
Log:
Use schedule trees to compute dependences

This patch changes Polly to compute the data-dependences on the schedule tree
instead of a flat schedule representation. Calculating dependences directly on
the schedule tree results in some good compile-time improvements (adi : -23.35%,
3mm : -9.57%), as the structure of the schedule can be exploited for increased
efficiency.

Earlier experiments with schedule tree based dependence analysis in Polly showed
some compile-time regressions. These regressions arose due to the schedule tree
based dependence analysis not taking into account the domain constraints of the
schedule tree. As a result, the computed dependences were different and this
difference caused in some cases the schedule optimizer to take a very long time.
Since isl version fe865996 the schedule tree based dependence analysis takes
domain constraints into account, which fixes the earlier compile-time issues.

Contributed-by: Pratik Bhatu <cs12b1010 at iith.ac.in>

Modified:
    polly/trunk/lib/Analysis/DependenceInfo.cpp

Modified: polly/trunk/lib/Analysis/DependenceInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/DependenceInfo.cpp?rev=245300&r1=245299&r2=245300&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/DependenceInfo.cpp (original)
+++ polly/trunk/lib/Analysis/DependenceInfo.cpp Tue Aug 18 10:05:29 2015
@@ -255,13 +255,11 @@ void Dependences::calculateDependences(S
 
   collectInfo(S, &Read, &Write, &MayWrite, &AccessSchedule, &StmtSchedule);
 
-  // TODO: Compute dependences directly on the schedule tree
-  //
-  // We currently don't do this yet, as the compile-time performance
-  // implications are not 100% understood (we see some regressions).
-  if (false && isl_union_map_is_empty(AccessSchedule)) {
+  if (isl_union_map_is_empty(AccessSchedule)) {
     isl_union_map_free(AccessSchedule);
     Schedule = S.getScheduleTree();
+    Schedule = isl_schedule_intersect_domain(
+        Schedule, isl_union_set_from_set(S.getAssumedContext()));
   } else {
     auto *ScheduleMap =
         isl_union_map_union(AccessSchedule, isl_union_map_copy(StmtSchedule));




More information about the llvm-commits mailing list