Skip to content

Commit 4f2616d

Browse files
committed
Add comment on why iterating only the entry block for vector insert replacement is OK
1 parent e496a3e commit 4f2616d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,9 @@ struct FuncOpVectorUnroll final : OpRewritePattern<func::FuncOp> {
10301030
}
10311031

10321032
// Replace dummy operands of new `vector.insert_strided_slice` ops with
1033-
// their corresponding new function arguments.
1033+
// their corresponding new function arguments. The new
1034+
// `vector.insert_strided_slice` ops are inserted only into the entry block,
1035+
// so iterating over that block is sufficient.
10341036
size_t unrolledInputIdx = 0;
10351037
for (auto [count, op] : enumerate(entryBlock.getOperations())) {
10361038
Operation &curOp = op;

0 commit comments

Comments
 (0)