///
/// @return The schedule function of this ScopStmt, if it does not contain
/// extension nodes, and nullptr, otherwise.
- __isl_give isl_map *getSchedule() const;
+ isl::map getSchedule() const;
/// Get an isl string representing this schedule.
///
} else {
accdom = tag(accdom, MA, Level);
if (Level > Dependences::AL_Statement) {
- auto *StmtScheduleMap = Stmt.getSchedule();
+ isl_map *StmtScheduleMap = Stmt.getSchedule().release();
assert(StmtScheduleMap &&
"Schedules that contain extension nodes require special "
"handling.");
}
if (!ReductionArrays.empty() && Level == Dependences::AL_Statement)
- StmtSchedule = isl_union_map_add_map(StmtSchedule, Stmt.getSchedule());
+ StmtSchedule =
+ isl_union_map_add_map(StmtSchedule, Stmt.getSchedule().release());
}
StmtSchedule =
isl_map *StmtScat;
if (NewSchedule->find(&Stmt) == NewSchedule->end())
- StmtScat = Stmt.getSchedule();
+ StmtScat = Stmt.getSchedule().release();
else
StmtScat = isl_map_copy((*NewSchedule)[&Stmt]);
assert(StmtScat &&
unsigned int MaxDim = SS.getNumIterators();
DEBUG(dbgs() << "Maximum depth of Stmt:\t" << MaxDim << "\n");
- auto *ScheduleMap = SS.getSchedule();
+ isl_map *ScheduleMap = SS.getSchedule().release();
assert(
ScheduleMap &&
"Schedules that contain extension nodes require special handling.");
//===----------------------------------------------------------------------===//
-__isl_give isl_map *ScopStmt::getSchedule() const {
+isl::map ScopStmt::getSchedule() const {
isl_set *Domain = getDomain().release();
if (isl_set_is_empty(Domain)) {
isl_set_free(Domain);
- return isl_map_from_aff(isl_aff_zero_on_domain(
- isl_local_space_from_space(getDomainSpace().release())));
+ return isl::manage(isl_map_from_aff(isl_aff_zero_on_domain(
+ isl_local_space_from_space(getDomainSpace().release()))));
}
auto *Schedule = getParent()->getSchedule();
if (!Schedule) {
if (isl_union_map_is_empty(Schedule)) {
isl_set_free(Domain);
isl_union_map_free(Schedule);
- return isl_map_from_aff(isl_aff_zero_on_domain(
- isl_local_space_from_space(getDomainSpace().release())));
+ 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 M;
+ return isl::manage(M);
}
void ScopStmt::restrictDomain(isl::set NewDomain) {
std::string ScopStmt::getDomainStr() const { return Domain.to_str(); }
std::string ScopStmt::getScheduleStr() const {
- auto *S = getSchedule();
+ auto *S = getSchedule().release();
if (!S)
return "";
auto Str = stringFromIslObj(S);
if (NewSchedule.find(&Stmt) != NewSchedule.end())
ScheduleMap = isl_union_map_add_map(ScheduleMap, NewSchedule[&Stmt]);
else
- ScheduleMap = isl_union_map_add_map(ScheduleMap, Stmt.getSchedule());
+ ScheduleMap =
+ isl_union_map_add_map(ScheduleMap, Stmt.getSchedule().release());
}
S.setSchedule(ScheduleMap);