diff options
-rw-r--r-- | polly/lib/Analysis/Dependences.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/polly/lib/Analysis/Dependences.cpp b/polly/lib/Analysis/Dependences.cpp index 71d8780a2af..c9cc7780bb5 100644 --- a/polly/lib/Analysis/Dependences.cpp +++ b/polly/lib/Analysis/Dependences.cpp @@ -102,17 +102,11 @@ void Dependences::collectInfo(Scop &S, isl_union_map **Read, // but as we transformed the access domain we need the scattering // to match the new access domains, thus we need // [Stmt[i0, i1] -> MemAcc_A[i0 + i1]] -> [0, i0, 2, i1, 0] + isl_map *Scatter = Stmt->getScattering(); + Scatter = isl_map_apply_domain( + Scatter, isl_map_reverse(isl_map_domain_map(isl_map_copy(accdom)))); accdom = isl_map_range_map(accdom); - - isl_map *stmt_scatter = Stmt->getScattering(); - isl_set *scatter_dom = isl_map_domain(isl_map_copy(accdom)); - isl_set *scatter_ran = isl_map_range(stmt_scatter); - isl_map *scatter = - isl_map_from_domain_and_range(scatter_dom, scatter_ran); - for (unsigned u = 0, e = Stmt->getNumIterators(); u != e; u++) - scatter = - isl_map_equate(scatter, isl_dim_out, 2 * u + 1, isl_dim_in, u); - *AccessSchedule = isl_union_map_add_map(*AccessSchedule, scatter); + *AccessSchedule = isl_union_map_add_map(*AccessSchedule, Scatter); } if (MA->isRead()) |