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

Commit c903c01

Browse files
author
Sven Verdoolaege
committed
boundInstancesAndMarkUnroll: drop elements from list
The function isl_multi_union_pw_aff_drop_dims will not be exposed in the mainline C++ interface. A similar function that drops base expression in the multi expression may get added later and this function could then be used here. For now, use slightly more verbose code to perform the dropping of elements on a list extracted from the multi expression.
1 parent e5f0096 commit c903c01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tc/core/polyhedral/unroll.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,14 @@ isl::val boundInstancesAndMarkUnroll(
9393
auto partial = band->mupa_;
9494
auto n = band->nMember();
9595

96+
auto list = partial.get_union_pw_aff_list();
97+
auto space = partial.get_space().domain();
9698
for (int i = n - 1; i >= 0; --i) {
9799
auto member = partial.get_union_pw_aff(i);
98100
auto outerMap = prefix;
99101
if (i > 0) {
100-
auto outer = partial.drop_dims(isl::dim_type::set, i, n - i);
102+
list = list.drop(i, 1);
103+
auto outer = isl::multi_union_pw_aff(addRange(space, list.size()), list);
101104
outerMap = outerMap.flat_range_product(isl::union_map::from(outer));
102105
}
103106
bound = bound.mul(relativeRange(outerMap, member));

0 commit comments

Comments
 (0)