Skip to content

Commit 3318f19

Browse files
committed
update flang
1 parent 52c72d3 commit 3318f19

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

flang/lib/Optimizer/Transforms/SimplifyRegionLite.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,16 @@ class SimplifyRegionLitePass
2626
public:
2727
void runOnOperation() override;
2828
};
29-
30-
class DummyRewriter : public mlir::PatternRewriter {
31-
public:
32-
DummyRewriter(mlir::MLIRContext *ctx) : mlir::PatternRewriter(ctx) {}
33-
};
34-
3529
} // namespace
3630

3731
void SimplifyRegionLitePass::runOnOperation() {
3832
auto op = getOperation();
3933
auto regions = op->getRegions();
4034
mlir::RewritePatternSet patterns(op.getContext());
41-
DummyRewriter rewriter(op.getContext());
4235
if (regions.empty())
4336
return;
4437

38+
mlir::PatternRewriter rewriter(op.getContext());
4539
(void)mlir::eraseUnreachableBlocks(rewriter, regions);
4640
(void)mlir::runRegionDCE(rewriter, regions);
4741
}

0 commit comments

Comments
 (0)