Skip to content

Commit bf9eeaa

Browse files
clementvalgithub-actions[bot]
authored andcommitted
Automerge: [flang] Use default constructor for FIRToSCF pass (#169741)
2 parents a7de59e + bd643bc commit bf9eeaa

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

flang/include/flang/Optimizer/Transforms/Passes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ std::unique_ptr<mlir::Pass>
4040
createArrayValueCopyPass(fir::ArrayValueCopyOptions options = {});
4141
std::unique_ptr<mlir::Pass> createMemDataFlowOptPass();
4242
std::unique_ptr<mlir::Pass> createPromoteToAffinePass();
43-
std::unique_ptr<mlir::Pass> createFIRToSCFPass();
4443
std::unique_ptr<mlir::Pass>
4544
createAddDebugInfoPass(fir::AddDebugInfoOptions options = {});
4645

flang/include/flang/Optimizer/Transforms/Passes.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def FIRToSCFPass : Pass<"fir-to-scf"> {
8181
let description = [{
8282
Convert FIR structured control flow ops to SCF dialect.
8383
}];
84-
let constructor = "::fir::createFIRToSCFPass()";
8584
let dependentDialects = [
8685
"fir::FIROpsDialect", "mlir::scf::SCFDialect"
8786
];

flang/lib/Optimizer/Transforms/FIRToSCF.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ namespace fir {
1818

1919
namespace {
2020
class FIRToSCFPass : public fir::impl::FIRToSCFPassBase<FIRToSCFPass> {
21+
using FIRToSCFPassBase::FIRToSCFPassBase;
22+
2123
public:
2224
void runOnOperation() override;
2325
};
@@ -230,7 +232,3 @@ void FIRToSCFPass::runOnOperation() {
230232
fir::populateFIRToSCFRewrites(patterns, parallelUnordered);
231233
walkAndApplyPatterns(getOperation(), std::move(patterns));
232234
}
233-
234-
std::unique_ptr<mlir::Pass> fir::createFIRToSCFPass() {
235-
return std::make_unique<FIRToSCFPass>();
236-
}

0 commit comments

Comments
 (0)