@@ -48,12 +48,10 @@ bool isSupportedReduction(Halide::Internal::Stmt stmt) {
48
48
// the reduction. that is a kind of internal state dependence we want to avoid
49
49
// If id is the statement identifier of an update statement
50
50
// of a supported type of reduction,
51
- // then return the corresponding init statement in init and
52
- // the corresponding reduction dimensions in reductionDims.
51
+ // then return the corresponding reduction dimensions in reductionDims.
53
52
bool isReductionUpdateId (
54
53
isl::id id,
55
54
const Scop& scop,
56
- Halide::Internal::Stmt& init,
57
55
std::vector<size_t >& reductionDims) {
58
56
CHECK_EQ (scop.halide .statements .count (id), 1u )
59
57
<< " id is not a statement in scop" << id;
@@ -63,7 +61,6 @@ bool isReductionUpdateId(
63
61
}
64
62
for (auto const & iup : scop.halide .reductions ) {
65
63
if (iup.update .same_as (provideNode)) {
66
- init = iup.init ;
67
64
reductionDims = iup.dims ;
68
65
return true ;
69
66
}
@@ -104,9 +101,8 @@ bool isAlmostIdentityReduction(isl::pw_aff pa, const Scop& scop) {
104
101
return false ;
105
102
}
106
103
auto stmtId = space.get_tuple_id (isl::dim_type::in);
107
- Halide::Internal::Stmt init;
108
104
std::vector<size_t > reductionDims;
109
- if (!isReductionUpdateId (stmtId, scop, init, reductionDims)) {
105
+ if (!isReductionUpdateId (stmtId, scop, reductionDims)) {
110
106
return false ;
111
107
}
112
108
@@ -124,9 +120,8 @@ isl::union_set reductionUpdates(isl::union_set domain, const Scop& scop) {
124
120
auto update = isl::union_set::empty (domain.get_space ());
125
121
domain.foreach_set ([&update, &scop](isl::set set) {
126
122
auto setId = set.get_tuple_id ();
127
- Halide::Internal::Stmt initStmt;
128
123
std::vector<size_t > reductionDims;
129
- if (isReductionUpdateId (setId, scop, initStmt, reductionDims)) {
124
+ if (isReductionUpdateId (setId, scop, reductionDims)) {
130
125
update = update.unite (set);
131
126
}
132
127
});
0 commit comments