[PATCH] D77133: [mlir] Add an out-of-tree dialect example
Jean-Michel Gorius via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 17:39:35 PDT 2020
Kayjukh accepted this revision.
Kayjukh marked 3 inline comments as done.
Kayjukh added inline comments.
================
Comment at: mlir/examples/standalone/standalone-opt/standalone-opt.cpp:57-96
+ registerAllDialects();
+ registerAllPasses();
+
+ registerDialect<standalone::StandaloneDialect>();
+ // TODO: Register standalone passes here.
+
+ InitLLVM y(argc, argv);
----------------
stephenneuendorffer wrote:
> I'm a little concerned about the amount of copy-pasta here: it would be nice if more of this could be pushed into MlirOptMain., but it's unclear what the most useful line is to draw around the 'shared' bits vs. the boilerplate that just has to get copied. I don't think this necessarily has to get changed before it goes in.
I think the current split makes most sense because it separates user input processing and tool-specific customization points (such as which dialects to enable in the final executable) from the core `MlirOptMain`.
There is a lot of copy-pasting in this case because I wanted to stick to the current `mlir-opt` behavior.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77133/new/
https://reviews.llvm.org/D77133
More information about the llvm-commits
mailing list