[polly] r308841 - Move MemoryAccess::getAddressFunction to isl++
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 22 21:08:45 PDT 2017
Author: grosser
Date: Sat Jul 22 21:08:45 2017
New Revision: 308841
URL: http://llvm.org/viewvc/llvm-project?rev=308841&view=rev
Log:
Move MemoryAccess::getAddressFunction to isl++
Modified:
polly/trunk/include/polly/ScopInfo.h
polly/trunk/lib/Analysis/ScopInfo.cpp
polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=308841&r1=308840&r2=308841&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sat Jul 22 21:08:45 2017
@@ -831,7 +831,7 @@ public:
/// will return the address function { S[i] -> A[4i] }.
///
/// @returns The address function for this memory access.
- __isl_give isl_map *getAddressFunction() const;
+ isl::map getAddressFunction() const;
/// Return the access relation after the schedule was applied.
__isl_give isl_pw_multi_aff *
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=308841&r1=308840&r2=308841&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sat Jul 22 21:08:45 2017
@@ -668,8 +668,8 @@ __isl_give isl_id *MemoryAccess::getLate
return NewAccessRelation.get_tuple_id(isl::dim::out).release();
}
-__isl_give isl_map *MemoryAccess::getAddressFunction() const {
- return isl_map_lexmin(getAccessRelation().release());
+isl::map MemoryAccess::getAddressFunction() const {
+ return getAccessRelation().lexmin();
}
__isl_give isl_pw_multi_aff *MemoryAccess::applyScheduleToAccessRelation(
@@ -680,7 +680,8 @@ __isl_give isl_pw_multi_aff *MemoryAcces
UDomain = isl_union_set_from_set(getStatement()->getDomain());
USchedule = isl_union_map_intersect_domain(USchedule, UDomain);
Schedule = isl_map_from_union_map(USchedule);
- ScheduledAccRel = isl_map_apply_domain(getAddressFunction(), Schedule);
+ ScheduledAccRel =
+ isl_map_apply_domain(getAddressFunction().release(), Schedule);
return isl_pw_multi_aff_from_map(ScheduledAccRel);
}
Modified: polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslNodeBuilder.cpp?rev=308841&r1=308840&r2=308841&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslNodeBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslNodeBuilder.cpp Sat Jul 22 21:08:45 2017
@@ -1163,7 +1163,7 @@ Value *IslNodeBuilder::preloadUnconditio
Value *IslNodeBuilder::preloadInvariantLoad(const MemoryAccess &MA,
isl_set *Domain) {
- isl_set *AccessRange = isl_map_range(MA.getAddressFunction());
+ isl_set *AccessRange = isl_map_range(MA.getAddressFunction().release());
AccessRange = isl_set_gist_params(AccessRange, S.getContext());
if (!materializeParameters(AccessRange)) {
Modified: polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp?rev=308841&r1=308840&r2=308841&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp Sat Jul 22 21:08:45 2017
@@ -273,7 +273,7 @@ static __isl_give isl_id_to_ast_expr *po
isl_id_to_ast_expr *RefToExpr = isl_id_to_ast_expr_alloc(Ctx, 0);
for (MemoryAccess *Acc : *Stmt) {
- isl_map *AddrFunc = Acc->getAddressFunction();
+ isl_map *AddrFunc = Acc->getAddressFunction().release();
AddrFunc = isl_map_intersect_domain(AddrFunc, Stmt->getDomain());
isl_id *RefId = Acc->getId().release();
isl_pw_multi_aff *PMA = isl_pw_multi_aff_from_map(AddrFunc);
More information about the llvm-commits
mailing list