[polly] r308837 - Move MemoryAccess::createBasicAccessMap to isl++
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 22 21:08:17 PDT 2017
Author: grosser
Date: Sat Jul 22 21:08:17 2017
New Revision: 308837
URL: http://llvm.org/viewvc/llvm-project?rev=308837&view=rev
Log:
Move MemoryAccess::createBasicAccessMap 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=308837&r1=308836&r2=308837&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sat Jul 22 21:08:17 2017
@@ -647,7 +647,7 @@ private:
AssertingVH<Value> FAD;
// @}
- __isl_give isl_basic_map *createBasicAccessMap(ScopStmt *Statement);
+ isl::basic_map createBasicAccessMap(ScopStmt *Statement);
void assumeNoOutOfBound();
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=308837&r1=308836&r2=308837&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sat Jul 22 21:08:17 2017
@@ -712,14 +712,13 @@ std::string MemoryAccess::getAccessRelat
return isl::manage(getAccessRelation()).to_str();
}
-__isl_give isl_basic_map *
-MemoryAccess::createBasicAccessMap(ScopStmt *Statement) {
- isl_space *Space = isl_space_set_alloc(Statement->getIslCtx(), 0, 1);
- Space = isl_space_align_params(Space, Statement->getDomainSpace());
-
- return isl_basic_map_from_domain_and_range(
- isl_basic_set_universe(Statement->getDomainSpace()),
- isl_basic_set_universe(Space));
+isl::basic_map MemoryAccess::createBasicAccessMap(ScopStmt *Statement) {
+ isl::space Space = isl::space(Statement->getIslCtx(), 0, 1);
+ Space = Space.align_params(isl::manage(Statement->getDomainSpace()));
+
+ return isl::basic_map::from_domain_and_range(
+ isl::basic_set::universe(isl::manage(Statement->getDomainSpace())),
+ isl::basic_set::universe(Space));
}
// Formalize no out-of-bound access assumption
@@ -977,7 +976,8 @@ void MemoryAccess::buildAccessRelation(c
// access must or may happen. However, for write accesses it is important to
// differentiate between writes that must happen and writes that may happen.
if (!AccessRelation)
- AccessRelation = isl_map_from_basic_map(createBasicAccessMap(Statement));
+ AccessRelation =
+ isl_map_from_basic_map(createBasicAccessMap(Statement).release());
AccessRelation =
isl_map_set_tuple_id(AccessRelation, isl_dim_out, BaseAddrId);
More information about the llvm-commits
mailing list