[flang-commits] [mlir] [flang] [MLIR][OpenMP] Changes to function-filtering pass (PR #71850)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Fri Nov 10 08:55:05 PST 2023
================
@@ -32,7 +33,15 @@ class OMPFunctionFilteringPass
public:
OMPFunctionFilteringPass() = default;
+ void getDependentDialects(DialectRegistry ®istry) const override {
+ // fir::UndefOp creation requires that FIROpsDialect dialect is loaded.
+ registry.insert<fir::FIROpsDialect>();
+ }
+
void runOnOperation() override {
+ MLIRContext *context = &getContext();
+ context->getOrLoadDialect<fir::FIROpsDialect>();
+ OpBuilder opBuilder(context);
----------------
kiranchandramohan wrote:
Would adding in https://github.com/llvm/llvm-project/blob/dbd00c3b5d8a0703e1457b5575b3400e2ebc0157/flang/include/flang/Optimizer/Transforms/Passes.td#L333 work for you?
https://github.com/llvm/llvm-project/pull/71850
More information about the flang-commits
mailing list