forked from OSchip/llvm-project
Move applyScheduleToAccessRelation to isl++
llvm-svn: 308842
This commit is contained in:
parent
6a87036e0f
commit
3b196131b5
|
@ -834,8 +834,8 @@ public:
|
|||
isl::map getAddressFunction() const;
|
||||
|
||||
/// Return the access relation after the schedule was applied.
|
||||
__isl_give isl_pw_multi_aff *
|
||||
applyScheduleToAccessRelation(__isl_take isl_union_map *Schedule) const;
|
||||
isl::pw_multi_aff
|
||||
applyScheduleToAccessRelation(isl::union_map Schedule) const;
|
||||
|
||||
/// Get an isl string representing the access function read from IR.
|
||||
std::string getOriginalAccessRelationStr() const;
|
||||
|
|
|
@ -672,17 +672,16 @@ isl::map MemoryAccess::getAddressFunction() const {
|
|||
return getAccessRelation().lexmin();
|
||||
}
|
||||
|
||||
__isl_give isl_pw_multi_aff *MemoryAccess::applyScheduleToAccessRelation(
|
||||
__isl_take isl_union_map *USchedule) const {
|
||||
isl_map *Schedule, *ScheduledAccRel;
|
||||
isl_union_set *UDomain;
|
||||
isl::pw_multi_aff
|
||||
MemoryAccess::applyScheduleToAccessRelation(isl::union_map USchedule) const {
|
||||
isl::map Schedule, ScheduledAccRel;
|
||||
isl::union_set UDomain;
|
||||
|
||||
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().release(), Schedule);
|
||||
return isl_pw_multi_aff_from_map(ScheduledAccRel);
|
||||
UDomain = isl::manage(getStatement()->getDomain());
|
||||
USchedule = USchedule.intersect_domain(UDomain);
|
||||
Schedule = isl::map::from_union_map(USchedule);
|
||||
ScheduledAccRel = getAddressFunction().apply_domain(Schedule);
|
||||
return isl::pw_multi_aff::from_map(ScheduledAccRel);
|
||||
}
|
||||
|
||||
isl::map MemoryAccess::getOriginalAccessRelation() const {
|
||||
|
|
|
@ -594,7 +594,7 @@ static __isl_give isl_printer *cbPrintUser(__isl_take isl_printer *P,
|
|||
isl::manage(isl_ast_build_copy(IslAstInfo::getBuild(Node)));
|
||||
if (MemAcc->isAffine()) {
|
||||
isl_pw_multi_aff *PwmaPtr =
|
||||
MemAcc->applyScheduleToAccessRelation(Build.get_schedule().release());
|
||||
MemAcc->applyScheduleToAccessRelation(Build.get_schedule()).release();
|
||||
isl::pw_multi_aff Pwma = isl::manage(PwmaPtr);
|
||||
isl::ast_expr AccessExpr = Build.access_from(Pwma);
|
||||
P = isl_printer_print_ast_expr(P, AccessExpr.get());
|
||||
|
|
|
@ -820,7 +820,8 @@ IslNodeBuilder::createNewAccesses(ScopStmt *Stmt,
|
|||
}
|
||||
#endif
|
||||
|
||||
auto PWAccRel = MA->applyScheduleToAccessRelation(Schedule);
|
||||
auto PWAccRel =
|
||||
MA->applyScheduleToAccessRelation(isl::manage(Schedule)).release();
|
||||
|
||||
// isl cannot generate an index expression for access-nothing accesses.
|
||||
isl::set AccDomain =
|
||||
|
|
Loading…
Reference in New Issue