File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
mlir/lib/Dialect/Affine/Utils Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1431,20 +1431,18 @@ void mlir::affine::createAffineComputationSlice(
1431
1431
// differ from opInst's operands only for those operands in 'subOperands', for
1432
1432
// which they will be replaced by the corresponding one from 'sliceOps'.
1433
1433
SmallVector<Value, 4 > newOperands (opInst->getOperands ());
1434
- for (unsigned i = 0 , e = newOperands. size (); i < e; i++ ) {
1434
+ for (Value &operand : newOperands) {
1435
1435
// Replace the subOperands from among the new operands.
1436
1436
unsigned j, f;
1437
1437
for (j = 0 , f = subOperands.size (); j < f; j++) {
1438
- if (newOperands[i] == subOperands[j])
1438
+ if (operand == subOperands[j])
1439
1439
break ;
1440
1440
}
1441
- if (j < subOperands.size ()) {
1442
- newOperands[i] = (*sliceOps)[j];
1443
- }
1441
+ if (j < subOperands.size ())
1442
+ operand = (*sliceOps)[j];
1444
1443
}
1445
- for (unsigned idx = 0 , e = newOperands.size (); idx < e; idx++) {
1444
+ for (unsigned idx = 0 , e = newOperands.size (); idx < e; idx++)
1446
1445
opInst->setOperand (idx, newOperands[idx]);
1447
- }
1448
1446
}
1449
1447
1450
1448
// / Enum to set patterns of affine expr in tiled-layout map.
You can’t perform that action at this time.
0 commit comments