@@ -2209,7 +2209,7 @@ void AffineForOp::print(OpAsmPrinter &p) {
2209
2209
if (getNumIterOperands () > 0 ) {
2210
2210
p << " iter_args(" ;
2211
2211
auto regionArgs = getRegionIterArgs ();
2212
- auto operands = getIterOperands ();
2212
+ auto operands = getInits ();
2213
2213
2214
2214
llvm::interleaveComma (llvm::zip (regionArgs, operands), p, [&](auto it) {
2215
2215
p << std::get<0 >(it) << " = " << std::get<1 >(it);
@@ -2331,7 +2331,7 @@ struct AffineForEmptyLoopFolder : public OpRewritePattern<AffineForOp> {
2331
2331
if (tripCount && *tripCount == 0 ) {
2332
2332
// The initial values of the iteration arguments would be the op's
2333
2333
// results.
2334
- rewriter.replaceOp (forOp, forOp.getIterOperands ());
2334
+ rewriter.replaceOp (forOp, forOp.getInits ());
2335
2335
return success ();
2336
2336
}
2337
2337
SmallVector<Value, 4 > replacements;
@@ -2352,7 +2352,7 @@ struct AffineForEmptyLoopFolder : public OpRewritePattern<AffineForOp> {
2352
2352
unsigned pos = std::distance (iterArgs.begin (), iterArgIt);
2353
2353
if (pos != i)
2354
2354
iterArgsNotInOrder = true ;
2355
- replacements.push_back (forOp.getIterOperands ()[pos]);
2355
+ replacements.push_back (forOp.getInits ()[pos]);
2356
2356
}
2357
2357
}
2358
2358
// Bail out when the trip count is unknown and the loop returns any value
@@ -2384,7 +2384,7 @@ OperandRange AffineForOp::getEntrySuccessorOperands(RegionBranchPoint point) {
2384
2384
2385
2385
// The initial operands map to the loop arguments after the induction
2386
2386
// variable or are forwarded to the results when the trip count is zero.
2387
- return getIterOperands ();
2387
+ return getInits ();
2388
2388
}
2389
2389
2390
2390
// / Given the region at `index`, or the parent operation if `index` is None,
@@ -2440,7 +2440,7 @@ LogicalResult AffineForOp::fold(FoldAdaptor adaptor,
2440
2440
// does not return any results. Since ops that do not return results cannot
2441
2441
// be folded away, we would enter an infinite loop of folds on the same
2442
2442
// affine.for op.
2443
- results.assign (getIterOperands ().begin (), getIterOperands ().end ());
2443
+ results.assign (getInits ().begin (), getInits ().end ());
2444
2444
folded = true ;
2445
2445
}
2446
2446
return success (folded);
@@ -2466,7 +2466,7 @@ void AffineForOp::setLowerBound(ValueRange lbOperands, AffineMap map) {
2466
2466
2467
2467
auto ubOperands = getUpperBoundOperands ();
2468
2468
newOperands.append (ubOperands.begin (), ubOperands.end ());
2469
- auto iterOperands = getIterOperands ();
2469
+ auto iterOperands = getInits ();
2470
2470
newOperands.append (iterOperands.begin (), iterOperands.end ());
2471
2471
(*this )->setOperands (newOperands);
2472
2472
@@ -2479,7 +2479,7 @@ void AffineForOp::setUpperBound(ValueRange ubOperands, AffineMap map) {
2479
2479
2480
2480
SmallVector<Value, 4 > newOperands (getLowerBoundOperands ());
2481
2481
newOperands.append (ubOperands.begin (), ubOperands.end ());
2482
- auto iterOperands = getIterOperands ();
2482
+ auto iterOperands = getInits ();
2483
2483
newOperands.append (iterOperands.begin (), iterOperands.end ());
2484
2484
(*this )->setOperands (newOperands);
2485
2485
@@ -2745,7 +2745,7 @@ AffineForOp mlir::affine::replaceForOpWithNewYields(OpBuilder &b,
2745
2745
// Create a new loop before the existing one, with the extra operands.
2746
2746
OpBuilder::InsertionGuard g (b);
2747
2747
b.setInsertionPoint (loop);
2748
- auto operands = llvm::to_vector<4 >(loop.getIterOperands ());
2748
+ auto operands = llvm::to_vector<4 >(loop.getInits ());
2749
2749
operands.append (newIterOperands.begin (), newIterOperands.end ());
2750
2750
SmallVector<Value, 4 > lbOperands (loop.getLowerBoundOperands ());
2751
2751
SmallVector<Value, 4 > ubOperands (loop.getUpperBoundOperands ());
0 commit comments