Skip to content

IMEX needs a CLI tool similar to mlir-opt #233

@diptorupd

Description

@diptorupd

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.td and Passes.h to our Conversion folder. These two files are provided by the MLIR repo and are used to define the registration functions for all Conversion passes.
  • Add Passes.td and Passes.h to all IMEX Dialect that define passes.
  • Add an InitIMEXDialects.h header similar to the InitAllDialects.h in MLIR.
  • Add an InitIMEXPasses.h header similar to InitAllPasses.h in MLIR.
  • Add an imex-opt.cpp source similar to mlir-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!!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions