@@ -48,12 +48,8 @@ bool isSupportedReduction(Halide::Internal::Stmt stmt) {
4848// TODO: the function currently available in Scop only works _after_ inserting
4949// the reduction. that is a kind of internal state dependence we want to avoid
5050// 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) {
5753 TC_CHECK_EQ (scop.halide .statements .count (id), 1u )
5854 << " id is not a statement in scop" << id;
5955 auto provideNode = scop.halide .statements .at (id);
@@ -62,7 +58,6 @@ bool isReductionUpdateId(
6258 }
6359 for (auto const & iup : scop.halide .reductions ) {
6460 if (iup.update .same_as (provideNode)) {
65- reductionDims = iup.dims ;
6661 return true ;
6762 }
6863 }
@@ -75,8 +70,7 @@ isl::union_set reductionUpdates(isl::union_set domain, const Scop& scop) {
7570 auto update = isl::union_set::empty (domain.get_space ());
7671 domain.foreach_set ([&update, &scop](isl::set set) {
7772 auto setId = set.get_tuple_id ();
78- std::vector<size_t > reductionDims;
79- if (isReductionUpdateId (setId, scop, reductionDims)) {
73+ if (isReductionUpdateId (setId, scop)) {
8074 update = update.unite (set);
8175 }
8276 });
0 commit comments