Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 16374f1

Browse files
author
Sven Verdoolaege
committed
use activeDomainPoints instead of activeDomainPointsNoMappingNoExtension
Now that activeDomainPoints no longer takes into account mapping filters, there is no longer any need for a specialized activeDomainPointsNoMappingNoExtension.
1 parent 30b5bc4 commit 16374f1

File tree

4 files changed

+3
-36
lines changed

4 files changed

+3
-36
lines changed

tc/core/polyhedral/cuda/mapped_scop.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,13 @@ class MappedScop {
190190
// to the thread identifiers, where all branches in "tree"
191191
// are assumed to have been mapped to thread identifiers.
192192
// The result lives in a space of the form block[x, ...].
193-
//
194-
// Note: this function ignores statements introduced by extension nodes.
195193
isl::multi_union_pw_aff threadMappingSchedule(
196194
const detail::ScheduleTree* tree) const;
197195

198196
// Extract a mapping from the domain elements active at "tree"
199197
// to the block identifiers, where all branches in "tree"
200198
// are assumed to have been mapped to block identifiers.
201199
// The result lives in a space of the form grid[x, ...].
202-
//
203-
// Note: this function ignores statements introduced by extension nodes.
204200
isl::multi_union_pw_aff blockMappingSchedule(
205201
const detail::ScheduleTree* tree) const;
206202

tc/core/polyhedral/cuda/memory_promotion_heuristic.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,6 @@ bool promotionImprovesCoalescing(
296296

297297
/*
298298
* Returns the union of all mapping filters to "MappingType" in "scop".
299-
*
300-
* Note: similarly to MappedScop::[thread|block]MappingSchedule, this function
301-
* does not take into account elements introduced by extension nodes.
302299
*/
303300
template <typename MappingType>
304301
isl::union_set collectMappingsTo(const Scop& scop) {
@@ -310,8 +307,7 @@ isl::union_set collectMappingsTo(const Scop& scop) {
310307
auto mapping = isl::union_set::empty(domain.get_space());
311308
for (auto mf : mappingFilters) {
312309
auto filterNode = mf->elemAs<detail::ScheduleTreeElemMappingFilter>();
313-
auto filter = filterNode->filter_.intersect(
314-
activeDomainPointsNoMappingNoExtension(root, mf));
310+
auto filter = filterNode->filter_.intersect(activeDomainPoints(root, mf));
315311
mapping = mapping.unite(filterNode->filter_);
316312
}
317313
return mapping;

tc/core/polyhedral/schedule_transforms.cc

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,6 @@ isl::union_set activeDomainPointsBelow(
180180
return activeDomainPointsHelper(root, ancestors);
181181
}
182182

183-
isl::union_set activeDomainPointsNoMappingNoExtension(
184-
const detail::ScheduleTree* root,
185-
const detail::ScheduleTree* tree) {
186-
auto domain = root->elemAs<detail::ScheduleTreeElemDomain>()->domain_;
187-
for (auto t : tree->ancestors(root)) {
188-
if (auto f = t->elemAs<detail::ScheduleTreeElemFilter>()) {
189-
domain = domain.intersect(f->filter_);
190-
}
191-
}
192-
return domain;
193-
}
194-
195183
vector<ScheduleTree*> collectScheduleTreesPath(
196184
std::function<ScheduleTree*(ScheduleTree*)> next,
197185
ScheduleTree* start) {
@@ -851,10 +839,6 @@ void orderAfter(ScheduleTree* root, ScheduleTree* tree, isl::union_set filter) {
851839
* to identifiers "ids", where all branches in "tree"
852840
* are assumed to have been mapped to these identifiers.
853841
* The result lives in a space of the form "tupleId"["ids"...].
854-
*
855-
* Note: this function only takes into account points that are present in the
856-
* root domain node. Those introduced by extension nodes are ignored. This
857-
* behavior can change in the future.
858842
*/
859843
isl::multi_union_pw_aff extractDomainToIds(
860844
const detail::ScheduleTree* root,
@@ -884,14 +868,14 @@ isl::multi_union_pw_aff extractDomainToIds(
884868
continue;
885869
}
886870
auto nodeToIds = isl::multi_union_pw_aff(space, list);
887-
auto active = activeDomainPointsNoMappingNoExtension(root, mapping);
871+
auto active = activeDomainPoints(root, mapping);
888872
TC_CHECK(active.intersect(domainToIds.domain()).is_empty())
889873
<< "conflicting mappings; are the filters in the tree disjoint?";
890874
nodeToIds = nodeToIds.intersect_domain(active);
891875
domainToIds = domainToIds.union_add(nodeToIds);
892876
}
893877

894-
auto active = activeDomainPointsNoMappingNoExtension(root, tree);
878+
auto active = activeDomainPoints(root, tree);
895879
TC_CHECK(active.is_subset(domainToIds.domain()))
896880
<< "not all domain points of\n"
897881
<< active << "\nwere mapped to the required ids";

tc/core/polyhedral/schedule_transforms.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -326,15 +326,6 @@ isl::union_set activeDomainPointsBelow(
326326
const detail::ScheduleTree* root,
327327
const detail::ScheduleTree* node);
328328

329-
// Get the set of domain points active below the given node without including
330-
// the points introduced by extension nodes and without treating mapping nodes
331-
// as filters. A point is considered active at a schedule node "tree" if it is
332-
// present in the "root" domain node and was not filtered away on the path from
333-
// "root" to "tree". The root must be a domain element.
334-
isl::union_set activeDomainPointsNoMappingNoExtension(
335-
const detail::ScheduleTree* root,
336-
const detail::ScheduleTree* tree);
337-
338329
// Collect the outer block/thread identifier mappings
339330
// into a filter on the active domain elements.
340331
isl::union_set prefixMappingFilter(

0 commit comments

Comments
 (0)