From: Tobias Grosser Date: Sun, 6 Aug 2017 17:25:14 +0000 (+0000) Subject: [ScopInfo] Move InvariantAccess to isl++ [NFC] X-Git-Tag: llvmorg-6.0.0-rc1~10751 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d16f9277814b8daeda3a31838fa260d70308fc54;p=platform%2Fupstream%2Fllvm.git [ScopInfo] Move InvariantAccess to isl++ [NFC] llvm-svn: 310213 --- diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index edbce0b..1c3619a 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -1122,7 +1122,7 @@ struct InvariantAccess { MemoryAccess *MA; /// The context under which the access is not invariant. - isl_set *NonHoistableCtx; + isl::set NonHoistableCtx; }; /// Ordered container type to hold invariant accesses. diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 11f9d5b..d62262e 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -3886,8 +3886,6 @@ void Scop::addInvariantLoads(ScopStmt &Stmt, InvariantAccessesTy &InvMAs) { auto *AccInst = InvMAs.front().MA->getAccessInstruction(); invalidate(COMPLEXITY, AccInst->getDebugLoc(), AccInst->getParent()); isl_set_free(DomainCtx); - for (auto &InvMA : InvMAs) - isl_set_free(InvMA.NonHoistableCtx); return; } @@ -3919,7 +3917,7 @@ void Scop::addInvariantLoads(ScopStmt &Stmt, InvariantAccessesTy &InvMAs) { for (auto &InvMA : InvMAs) { auto *MA = InvMA.MA; - auto *NHCtx = InvMA.NonHoistableCtx; + auto *NHCtx = InvMA.NonHoistableCtx.copy(); // Check for another invariant access that accesses the same location as // MA and if found consolidate them. Otherwise create a new equivalence @@ -4116,7 +4114,7 @@ void Scop::hoistInvariantLoads() { for (MemoryAccess *Access : Stmt) if (isl::set NHCtx = getNonHoistableCtx(Access, Writes)) - InvariantAccesses.push_back({Access, NHCtx.release()}); + InvariantAccesses.push_back({Access, NHCtx}); // Transfer the memory access from the statement to the SCoP. for (auto InvMA : InvariantAccesses)