[PATCH] D95399: [flang][fir] Upstream FIR dialect changes.

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 08:39:24 PST 2021


schweitz added inline comments.


================
Comment at: flang/include/flang/Optimizer/Dialect/FIRDialect.h:49
+  explicit FIRCodeGenDialect(mlir::MLIRContext *ctx);
+  virtual ~FIRCodeGenDialect();
+
----------------
mehdi_amini wrote:
> 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.
Per the feedback received on the flang community calls regarding the upstreaming plan, these diffs are meant to follow the proposed plan. The FIR "chunk" being broken down into a small series of linked reviews. In aggregate, the diffs compose a buildable and testable merge.



================
Comment at: flang/include/flang/Optimizer/Dialect/FIRDialect.h:68
   // clang-format on
+  registry.loadAll(&ctx);
 }
----------------
mehdi_amini wrote:
> 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
Thanks for the reference. It's not part of these diffs, but it is probably worth mentioning that the flang front-end is not structured as an MLIR pass.


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