Deprecations & Current Refactoring
This page collects current deprecations in MLIR of API and features we intend to remove soon, as well as large refactoring an migration on-going. We try to list these here for the purpose of helping downstream users keeping up with MLIR development.
Deprecated
preloadDialectInContext
has been deprecated for >1y and will be removed
If you have an mlir-opt tool and you’re still depending on
preloadDialectInContext
, you need to revisit your pipeline. This option
used with mlir-opt is hiding issues with the pipeline, and indications of
missing getDependentDialects().
Discussion on Discourse
Migrating mlir-opt
-like tools to use MlirOptMainConfig
If your mlir-opt
-like tool is using the
MlirOptMain(int argc, char **argv, ...)
entry point you won’t be affected,
otherwise, see the
Discussion on Discourse
Use the free function variants for dyn_cast
/cast
/isa
/…
When casting attributes or type, use the free functions variants, e.g.,
dyn_cast<T>(x)
, isa<T>(x)
, etc. Use of the cast methods variants (e.g.,
x.dyn_cast<T>()
) should be avoided in new code as we’ll remove these
methods in the future.
Discussion on Discourse
Port uses of LLVM Dialect to opaque pointers
LLVM 17 has stopped officially supporting typed pointers and MLIRs LLVM Dialect will follow suit soon by removing them. Users of the LLVM Dialect must switch to using opaque pointers and stop relying on pointers having an element type. See the initial PSA post for precise instructions and timeline.