[PATCH] D77133: [mlir] Add an out-of-tree dialect example
Stephen Neuendorffer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 12:33:13 PDT 2020
stephenneuendorffer requested changes to this revision.
stephenneuendorffer added a comment.
This revision now requires changes to proceed.
Thanks for taking the lead on this!
================
Comment at: mlir/examples/standalone/README.md:5
+
+TODO: Add a link to a tutorial.
+
----------------
This needs some documentation before it goes in.
================
Comment at: mlir/examples/standalone/include/Standalone/StandaloneOps.td:13
+include "StandaloneDialect.td"
+
+#endif // STANDALONE_OPS
----------------
I think this actually needs to define an OP and use it.
================
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);
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77133/new/
https://reviews.llvm.org/D77133
More information about the llvm-commits
mailing list