From 28492b85e2be14d8ba60d3d876c9c27222073f95 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sat, 18 Feb 2017 16:41:28 +0000 Subject: [PATCH] [DependenceInfo] Pull out statement [NFC] This simplifies the code slightly. llvm-svn: 295551 --- polly/lib/Analysis/DependenceInfo.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp index eed23c7faa86..f1d91ac15a3b 100644 --- a/polly/lib/Analysis/DependenceInfo.cpp +++ b/polly/lib/Analysis/DependenceInfo.cpp @@ -320,9 +320,10 @@ void Dependences::calculateDependences(Scop &S) { dbgs() << "AccessSchedule: " << AccessSchedule << '\n'; dbgs() << "StmtSchedule: " << StmtSchedule << '\n';); + Schedule = S.getScheduleTree(); + if (!HasReductions) { isl_union_map_free(AccessSchedule); - Schedule = S.getScheduleTree(); // Tag the schedule tree if we want fine-grain dependence info if (Level > AL_Statement) { auto TaggedDom = isl_union_map_domain((isl_union_map_copy(StmtSchedule))); @@ -335,8 +336,6 @@ void Dependences::calculateDependences(Scop &S) { isl_union_map *ReductionMap, *IdentityMap; isl_union_pw_multi_aff *ReductionTags, *IdentityTags, *Tags; - Schedule = S.getScheduleTree(); - // Extract reduction tags from the access schedule. The result is a map that // maps each tagged element in the domain to the memory location it // accesses.