File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
mlir/lib/Dialect/SCF/Transforms Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -1207,17 +1207,11 @@ struct ForallOpInterface
1207
1207
ForallOp> {
1208
1208
bool bufferizesToMemoryRead (Operation *op, OpOperand &opOperand,
1209
1209
const AnalysisState &state) const {
1210
- auto forallOp = cast<ForallOp>(op);
1211
-
1212
- // If the loop has zero iterations, the results of the op are their
1213
- // corresponding shared_outs, meaning that the shared_outs bufferize to a
1214
- // read.
1215
- if (mayHaveZeroIterations (forallOp))
1216
- return true ;
1217
-
1218
- // scf::ForallOp alone doesn't bufferize to a memory read, one of the
1219
- // uses of its matching bbArg may.
1220
- return state.isValueRead (forallOp.getTiedBlockArgument (&opOperand));
1210
+ // All tensor operands to `scf.forall` are `shared_outs` and all
1211
+ // shared outs are assumed to be read by the loop. This does not
1212
+ // account for the case where the entire value is over-written,
1213
+ // but being conservative here.
1214
+ return true ;
1221
1215
}
1222
1216
1223
1217
bool bufferizesToMemoryWrite (Operation *op, OpOperand &opOperand,
You can’t perform that action at this time.
0 commit comments