-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
The mlir-opt tool makes it easy to run any MLIR pass using a default global registry. The tool is useful to design FileCheck test cases.
IMEX needs a similar tool. The following pieces need to be put in place before the tool can be put together:
- Add a
Passes.tdandPasses.hto ourConversionfolder. These two files are provided by the MLIR repo and are used to define the registration functions for allConversionpasses. - Add
Passes.tdandPasses.hto all IMEXDialectthat define passes. - Add an
InitIMEXDialects.hheader similar to theInitAllDialects.hin MLIR. - Add an
InitIMEXPasses.hheader similar toInitAllPasses.hin MLIR. - Add an
imex-opt.cppsource similar tomlir-opt.cpp
Explore automation possibilities to auto-generate these files as most of the files will need mechanical maintenance.
PS: The automation scripts in our repo are meta^2 programming. Use Python to generate TableGen that then generates C++. Ergo, Python rules them all!!