Skip to content

Commit cf9ebb6

Browse files
committed
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 <[email protected]> llvm-svn: 245300
1 parent 079968e commit cf9ebb6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

polly/lib/Analysis/DependenceInfo.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,11 @@ void Dependences::calculateDependences(Scop &S) {
255255

256256
collectInfo(S, &Read, &Write, &MayWrite, &AccessSchedule, &StmtSchedule);
257257

258-
// TODO: Compute dependences directly on the schedule tree
259-
//
260-
// We currently don't do this yet, as the compile-time performance
261-
// implications are not 100% understood (we see some regressions).
262-
if (false && isl_union_map_is_empty(AccessSchedule)) {
258+
if (isl_union_map_is_empty(AccessSchedule)) {
263259
isl_union_map_free(AccessSchedule);
264260
Schedule = S.getScheduleTree();
261+
Schedule = isl_schedule_intersect_domain(
262+
Schedule, isl_union_set_from_set(S.getAssumedContext()));
265263
} else {
266264
auto *ScheduleMap =
267265
isl_union_map_union(AccessSchedule, isl_union_map_copy(StmtSchedule));

0 commit comments

Comments
 (0)