Skip to content

Commit 99d821b

Browse files
committed
address more comments
1 parent 6dd68c1 commit 99d821b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ static void fuseIfLegal(ParallelOp firstPloop, ParallelOp &secondPloop,
161161
IRRewriter rewriter(builder);
162162
secondPloop = mlir::fuseIndependentSiblingParallelLoops(
163163
firstPloop, secondPloop, rewriter);
164-
;
165164
}
166165

167166
void mlir::scf::naivelyFuseParallelOps(

mlir/lib/Dialect/SCF/Utils/Utils.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,13 +1164,11 @@ bool mlir::checkFusionStructuralLegality(LoopLikeOpInterface target,
11641164
target.getLoopLowerBounds() == source.getLoopLowerBounds() &&
11651165
target.getLoopUpperBounds() == source.getLoopUpperBounds() &&
11661166
target.getLoopSteps() == source.getLoopSteps();
1167-
auto forAllTarget = dyn_cast<scf::ForallOp>(*target);
1168-
auto forAllSource = dyn_cast<scf::ForallOp>(*source);
11691167
// TODO: Decouple checks on concrete loop types and move this function
11701168
// somewhere for general utility for `LoopLikeOpInterface`
1171-
if (forAllTarget && forAllSource)
1172-
iterSpaceEq =
1173-
iterSpaceEq && forAllTarget.getMapping() == forAllSource.getMapping();
1169+
if (auto forAllTarget = dyn_cast<scf::ForallOp>(*target))
1170+
iterSpaceEq = iterSpaceEq && forAllTarget.getMapping() ==
1171+
cast<scf::ForallOp>(*source).getMapping();
11741172
if (!iterSpaceEq) {
11751173
diag << "target and source iteration spaces must be equal";
11761174
return false;

0 commit comments

Comments
 (0)