Index: lib/Analysis/DependenceInfo.cpp =================================================================== --- lib/Analysis/DependenceInfo.cpp +++ lib/Analysis/DependenceInfo.cpp @@ -150,16 +150,9 @@ // but as we transformed the access domain we need the schedule // to match the new access domains, thus we need // [Stmt[i0, i1] -> MemAcc_A[i0 + i1]] -> [0, i0, 2, i1, 0] - isl_map *Schedule = Stmt.getSchedule(); - assert(Schedule && - "Schedules that contain extension nodes require special " - "handling."); - Schedule = isl_map_apply_domain( - Schedule, - isl_map_reverse(isl_map_domain_map(isl_map_copy(accdom)))); - accdom = isl_map_range_map(accdom); - *AccessSchedule = isl_union_map_add_map(*AccessSchedule, Schedule); + *AccessSchedule = isl_union_map_add_map(*AccessSchedule, isl_map_copy(accdom)); + accdom = isl_map_range_map(accdom); } else { accdom = tag(accdom, MA, Level); if (Level > Dependences::AL_Statement) { @@ -185,6 +178,7 @@ *StmtSchedule = isl_union_map_intersect_params(*StmtSchedule, S.getAssumedContext()); + *AccessSchedule = isl_union_map_coalesce(*AccessSchedule); *Read = isl_union_map_coalesce(*Read); *Write = isl_union_map_coalesce(*Write); *MayWrite = isl_union_map_coalesce(*MayWrite); @@ -332,8 +326,8 @@ Schedule = isl_schedule_pullback_union_pw_multi_aff(Schedule, Tags); } } else { - isl_union_set *ReductionDom, *IdentityDom; - isl_union_map *ReductionMap, *IdentityMap; + isl_union_set *IdentityDom; + isl_union_map *IdentityMap; isl_union_pw_multi_aff *ReductionTags, *IdentityTags, *Tags; // Extract reduction tags from the access schedule. The result is a map that @@ -341,9 +335,7 @@ // accesses. // // ReductionTags = {[Stmt[i] -> Array[f(i)]] -> Stmt[i] } - ReductionDom = isl_union_map_domain((AccessSchedule)); - ReductionMap = isl_union_set_unwrap(ReductionDom); - ReductionTags = isl_union_map_domain_map_union_pw_multi_aff(ReductionMap); + ReductionTags = isl_union_map_domain_map_union_pw_multi_aff(AccessSchedule); // Compute an identity map from each statement in domain to itself. // IdentityTags = { [Stmt[i] -> Stmt[i] }