[polly] r310815 - Move ScopStmt::getSchedule to islpp. NFC.
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 13 23:49:06 PDT 2017
Author: grosser
Date: Sun Aug 13 23:49:06 2017
New Revision: 310815
URL: http://llvm.org/viewvc/llvm-project?rev=310815&view=rev
Log:
Move ScopStmt::getSchedule to islpp. NFC.
Reviewers: grosser, Meinersbur, bollu
Differential Revision: https://reviews.llvm.org/D36660
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=310815&r1=310814&r2=310815&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Aug 13 23:49:06 2017
@@ -1222,30 +1222,20 @@ bool MemoryAccess::isLatestPartialAccess
//===----------------------------------------------------------------------===//
isl::map ScopStmt::getSchedule() const {
- isl_set *Domain = getDomain().release();
- if (isl_set_is_empty(Domain)) {
- isl_set_free(Domain);
- return isl::manage(isl_map_from_aff(isl_aff_zero_on_domain(
- isl_local_space_from_space(getDomainSpace().release()))));
- }
- auto *Schedule = getParent()->getSchedule().release();
- if (!Schedule) {
- isl_set_free(Domain);
+ isl::set Domain = getDomain();
+ if (Domain.is_empty())
+ return isl::map::from_aff(isl::aff(isl::local_space(getDomainSpace())));
+ auto Schedule = getParent()->getSchedule();
+ if (!Schedule)
return nullptr;
- }
- Schedule = isl_union_map_intersect_domain(
- Schedule, isl_union_set_from_set(isl_set_copy(Domain)));
- if (isl_union_map_is_empty(Schedule)) {
- isl_set_free(Domain);
- isl_union_map_free(Schedule);
- return isl::manage(isl_map_from_aff(isl_aff_zero_on_domain(
- isl_local_space_from_space(getDomainSpace().release()))));
- }
- auto *M = isl_map_from_union_map(Schedule);
- M = isl_map_coalesce(M);
- M = isl_map_gist_domain(M, Domain);
- M = isl_map_coalesce(M);
- return isl::manage(M);
+ Schedule = Schedule.intersect_domain(isl::union_set(Domain));
+ if (Schedule.is_empty())
+ return isl::map::from_aff(isl::aff(isl::local_space(getDomainSpace())));
+ isl::map M = M.from_union_map(Schedule);
+ M = M.coalesce();
+ M = M.gist_domain(Domain);
+ M = M.coalesce();
+ return M;
}
void ScopStmt::restrictDomain(isl::set NewDomain) {
More information about the llvm-commits
mailing list