This is primarily for testing libMLIR.so
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is good to have as a test, but I assume that eventually we would want to have the equivalent of LLVM_LINK_LLVM_DYLIB.
I've gone back and forth. I think it's weird for the 'regular' mlir-opt to include the test dialect. I was thinking that the test dialect should run with a test-mlir-opt
which includes the test dialect in addition to all the normal dialects. (or maybe *only* the test dialect?)
Out of curiosity, no need to call define and registerTestPasses()? Further, calling registerAllDialects() and registerAllPasses() can be skipped? Is that due linking against libMLIR.so?
No, this is just a little old. Currently, calling registerAllDialects() and registerAllPasses() is required if you want any of the standard stuff. The .cpp code was just a copy of what's in tools/mlir-opt. The critical part of this is the CMakeLists.txt, which was intended as a test for linking against libMLIR.so. If you actually want to build an external project see: https://reviews.llvm.org/D76047
Thanks for clarifying. I was just surprised and thought I might have missed something. I actually forked the mlir-opt for IREE.