[polly] r308893 - Move MemoryAccess::MemoryAccess to isl++
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 09:22:32 PDT 2017
Author: grosser
Date: Mon Jul 24 09:22:32 2017
New Revision: 308893
URL: http://llvm.org/viewvc/llvm-project?rev=308893&view=rev
Log:
Move MemoryAccess::MemoryAccess to isl++
Modified:
polly/trunk/include/polly/ScopInfo.h
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=308893&r1=308892&r2=308893&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Mon Jul 24 09:22:32 2017
@@ -747,7 +747,7 @@ public:
/// @param Stmt The parent statement.
/// @param AccType Whether read or write access.
/// @param AccRel The access relation that describes the memory access.
- MemoryAccess(ScopStmt *Stmt, AccessType AccType, __isl_take isl_map *AccRel);
+ MemoryAccess(ScopStmt *Stmt, AccessType AccType, isl::map AccRel);
~MemoryAccess();
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=308893&r1=308892&r2=308893&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Mon Jul 24 09:22:32 2017
@@ -1010,12 +1010,11 @@ MemoryAccess::MemoryAccess(ScopStmt *Stm
Id = isl::id::alloc(Stmt->getParent()->getIslCtx(), IdName.c_str(), this);
}
-MemoryAccess::MemoryAccess(ScopStmt *Stmt, AccessType AccType,
- __isl_take isl_map *AccRel)
+MemoryAccess::MemoryAccess(ScopStmt *Stmt, AccessType AccType, isl::map AccRel)
: Kind(MemoryKind::Array), AccType(AccType), RedType(RT_NONE),
Statement(Stmt), InvalidDomain(nullptr), AccessInstruction(nullptr),
- IsAffine(true), AccessRelation(nullptr),
- NewAccessRelation(isl::manage(AccRel)), FAD(nullptr) {
+ IsAffine(true), AccessRelation(nullptr), NewAccessRelation(AccRel),
+ FAD(nullptr) {
isl::id ArrayInfoId = NewAccessRelation.get_tuple_id(isl::dim::out);
auto *SAI = ScopArrayInfo::getFromId(ArrayInfoId);
Sizes.push_back(nullptr);
@@ -1746,12 +1745,13 @@ ScopStmt::ScopStmt(Scop &parent, __isl_t
auto *Id = isl_id_alloc(getIslCtx(), getBaseName(), this);
Domain = isl_set_set_tuple_id(Domain, isl_id_copy(Id));
TargetRel = isl_map_set_tuple_id(TargetRel, isl_dim_in, Id);
- auto *Access =
- new MemoryAccess(this, MemoryAccess::AccessType::MUST_WRITE, TargetRel);
+ auto *Access = new MemoryAccess(this, MemoryAccess::AccessType::MUST_WRITE,
+ isl::manage(TargetRel));
parent.addAccessFunction(Access);
addAccess(Access);
SourceRel = isl_map_set_tuple_id(SourceRel, isl_dim_in, isl_id_copy(Id));
- Access = new MemoryAccess(this, MemoryAccess::AccessType::READ, SourceRel);
+ Access = new MemoryAccess(this, MemoryAccess::AccessType::READ,
+ isl::manage(SourceRel));
parent.addAccessFunction(Access);
addAccess(Access);
}
More information about the llvm-commits
mailing list