Skip to content

Commit cce652c

Browse files
committed
Fix according to comments.
1 parent bb6ba58 commit cce652c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

mlir/lib/Dialect/SCF/IR/SCF.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,9 +1911,9 @@ struct FoldTensorCastOfOutputIntoForallOp
19111911
auto terminator = newForallOp.getTerminator();
19121912
for (auto [yieldingOp, outputBlockArg] : llvm::zip(
19131913
terminator.getYieldingOps(), newForallOp.getRegionIterArgs())) {
1914-
if (auto inParallelOp =
1914+
if (auto parallelCombingingOp =
19151915
dyn_cast<ParallelCombiningOpInterface>(yieldingOp)) {
1916-
inParallelOp.getUpdatedDestinations().assign(outputBlockArg);
1916+
parallelCombingingOp.getUpdatedDestinations().assign(outputBlockArg);
19171917
}
19181918
}
19191919

@@ -1974,8 +1974,8 @@ LogicalResult InParallelOp::verify() {
19741974
return this->emitOpError("expected forall op parent");
19751975

19761976
for (Operation &op : getRegion().front().getOperations()) {
1977-
auto inParallelOp = dyn_cast<ParallelCombiningOpInterface>(&op);
1978-
if (!inParallelOp) {
1977+
auto parallelCombiningOp = dyn_cast<ParallelCombiningOpInterface>(&op);
1978+
if (!parallelCombiningOp) {
19791979
return this->emitOpError("expected only ParallelCombiningOpInterface")
19801980
<< " ops";
19811981
}
@@ -2025,8 +2025,9 @@ OpResult InParallelOp::getParentResult(int64_t idx) {
20252025
SmallVector<BlockArgument> InParallelOp::getDests() {
20262026
SmallVector<BlockArgument> updatedDests;
20272027
for (Operation &yieldingOp : getYieldingOps()) {
2028-
auto inParallelOp = dyn_cast<ParallelCombiningOpInterface>(&yieldingOp);
2029-
if (!inParallelOp)
2028+
auto parallelCombiningOp =
2029+
dyn_cast<ParallelCombiningOpInterface>(&yieldingOp);
2030+
if (!parallelCombingingOp)
20302031
continue;
20312032
for (OpOperand &updatedOperand : inParallelOp.getUpdatedDestinations())
20322033
updatedDests.push_back(cast<BlockArgument>(updatedOperand.get()));

mlir/lib/Dialect/Tensor/IR/TensorOps.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3934,13 +3934,13 @@ llvm::SmallBitVector ParallelInsertSliceOp::getDroppedDims() {
39343934
return ::getDroppedDims(getSourceType().getShape(), getMixedSizes());
39353935
}
39363936

3937-
// ParallelCombiningOpInterface implementation
3937+
// ParallelCombiningOpInterface implementation.
39383938
MutableOperandRange ParallelInsertSliceOp::getUpdatedDestinations() {
39393939
return getDestMutable();
39403940
}
39413941

39423942
Operation *ParallelInsertSliceOp::getIteratingParent() {
3943-
// Return the parent InParallelOpInterface's parent
3943+
// Return the parent InParallelOpInterface's parent.
39443944
if (auto combiningOp =
39453945
dyn_cast<InParallelOpInterface>(getOperation()->getParentOp())) {
39463946
return combiningOp->getParentOp();

0 commit comments

Comments
 (0)