@@ -48,12 +48,8 @@ bool isSupportedReduction(Halide::Internal::Stmt stmt) {
48
48
// TODO: the function currently available in Scop only works _after_ inserting
49
49
// the reduction. that is a kind of internal state dependence we want to avoid
50
50
// If id is the statement identifier of an update statement
51
- // of a supported type of reduction,
52
- // then return the corresponding reduction dimensions in reductionDims.
53
- bool isReductionUpdateId (
54
- isl::id id,
55
- const Scop& scop,
56
- std::vector<size_t >& reductionDims) {
51
+ // of a supported type of reduction, then return true.
52
+ bool isReductionUpdateId (isl::id id, const Scop& scop) {
57
53
TC_CHECK_EQ (scop.halide .statements .count (id), 1u )
58
54
<< " id is not a statement in scop" << id;
59
55
auto provideNode = scop.halide .statements .at (id);
@@ -62,7 +58,6 @@ bool isReductionUpdateId(
62
58
}
63
59
for (auto const & iup : scop.halide .reductions ) {
64
60
if (iup.update .same_as (provideNode)) {
65
- reductionDims = iup.dims ;
66
61
return true ;
67
62
}
68
63
}
@@ -75,8 +70,7 @@ isl::union_set reductionUpdates(isl::union_set domain, const Scop& scop) {
75
70
auto update = isl::union_set::empty (domain.get_space ());
76
71
domain.foreach_set ([&update, &scop](isl::set set) {
77
72
auto setId = set.get_tuple_id ();
78
- std::vector<size_t > reductionDims;
79
- if (isReductionUpdateId (setId, scop, reductionDims)) {
73
+ if (isReductionUpdateId (setId, scop)) {
80
74
update = update.unite (set);
81
75
}
82
76
});
0 commit comments