[PATCH] D95399: [flang][fir] Upstream FIR dialect changes.
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 17:18:01 PST 2021
mehdi_amini added inline comments.
================
Comment at: flang/include/flang/Optimizer/Dialect/FIRDialect.h:49
+ explicit FIRCodeGenDialect(mlir::MLIRContext *ctx);
+ virtual ~FIRCodeGenDialect();
+
----------------
schweitz wrote:
> mehdi_amini wrote:
> > I don't find a definition for these methods right now?
> See https://reviews.llvm.org/D95401
OK, but this patch can't be built / tested at the moment in this state I think.
================
Comment at: flang/include/flang/Optimizer/Dialect/FIRDialect.h:68
// clang-format on
+ registry.loadAll(&ctx);
}
----------------
schweitz wrote:
> mehdi_amini wrote:
> > Why is this needed? In general this indicates a misconfiguration of the pipeline and shouldn't be used.
> >
> > (also this method is not used in this patch)
> The test tools call this to register the dialects they'll use. If there is some preferred way of forcing that to happen, can you provide a pointer? Thanks.
The dialect registered don't need to be loaded in the context, just inserting them should be enough for parsing any input containing these dialects.
If there are passes converting a dialect into another one, the destination dialect can be declared through https://mlir.llvm.org/docs/PassManagement/#dependent-dialects
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95399/new/
https://reviews.llvm.org/D95399
More information about the llvm-commits
mailing list