diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp index e5d286196d3a..b1ad32ef2d66 100644 --- a/polly/lib/Analysis/DependenceInfo.cpp +++ b/polly/lib/Analysis/DependenceInfo.cpp @@ -123,12 +123,12 @@ static void collectInfo(Scop &S, isl_union_map **Read, isl_union_map **Write, *AccessSchedule = isl_union_map_empty(isl_space_copy(Space)); *StmtSchedule = isl_union_map_empty(Space); - SmallPtrSet ReductionBaseValues; + SmallPtrSet ReductionArrays; if (UseReductions) for (ScopStmt &Stmt : S) for (MemoryAccess *MA : Stmt) if (MA->isReductionLike()) - ReductionBaseValues.insert(MA->getBaseAddr()); + ReductionArrays.insert(MA->getScopArrayInfo()); for (ScopStmt &Stmt : S) { for (MemoryAccess *MA : Stmt) { @@ -137,7 +137,7 @@ static void collectInfo(Scop &S, isl_union_map **Read, isl_union_map **Write, accdom = isl_map_intersect_domain(accdom, domcp); - if (ReductionBaseValues.count(MA->getBaseAddr())) { + if (ReductionArrays.count(MA->getScopArrayInfo())) { // Wrap the access domain and adjust the schedule accordingly. // // An access domain like @@ -178,7 +178,7 @@ static void collectInfo(Scop &S, isl_union_map **Read, isl_union_map **Write, *Write = isl_union_map_add_map(*Write, accdom); } - if (!ReductionBaseValues.empty() && Level == Dependences::AL_Statement) + if (!ReductionArrays.empty() && Level == Dependences::AL_Statement) *StmtSchedule = isl_union_map_add_map(*StmtSchedule, Stmt.getSchedule()); }