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

Commit 515be20

Browse files
committed
insertCopiesUnder: make groupId argument mandatory
The default null value of the groupId in insertCopiesUnder was left over during a refactoring in the prehistory. The function checks if it is not null early, without any side effects before the check. Remove the default value of the argument and the check. The group id is now mandatory, and it is ensured by a compile-time rather than by a runtime check.
1 parent 184524f commit 515be20

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

tc/core/polyhedral/memory_promotion.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,6 @@ ScheduleTree* insertCopiesUnder(
475475
// Take the set of all tensor elements.
476476
auto tensorElements = tensorElementsSet(scop, tensorId);
477477

478-
if (groupId.is_null()) {
479-
throw promotion::GroupingError("expected group id");
480-
}
481478
auto promotion =
482479
isl::map(group.promotion()).set_tuple_id(isl::dim_type::out, groupId);
483480
auto promotionSpace = promotion.get_space();

tc/core/polyhedral/memory_promotion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,6 @@ detail::ScheduleTree* insertCopiesUnder(
214214
detail::ScheduleTree* tree,
215215
const TensorReferenceGroup& group,
216216
isl::id tensorId,
217-
isl::id groupId = isl::id());
217+
isl::id groupId);
218218
} // namespace polyhedral
219219
} // namespace tc

0 commit comments

Comments
 (0)